instagram api - subscript out of bounds - R -


i want connect instagram api , getting data r. got subscript out of bounds error @ end. please me sort out. thanks

app_name<-"hamidtt" client_id<-"xxx" client_secret<-"xxx" scope="public_content" instagram <- oauth_endpoint(authorize = "https://api.instagram.com/oauth/authorize",access = "https://api.instagram.com/oauth/access_token")   myapp <- oauth_app(app_name, client_id, client_secret) ig_oauth <- oauth2.0_token(instagram, myapp,scope="public_content",  type = "application/x-www-form-urlencoded",cache=false)  # waiting authentication in browser... # press esc/ctrl + c abort # authentication complete.  tmp <- strsplit(tostring(names(ig_oauth$credentials)), '"') token <- tmp[[1]][4] username<-"hrouhani" user_info <- fromjson(geturl(paste('https://api.instagram.com/v1/users/search?q=',username,'&access_token=',token,sep="")),unexpected.escape = "keep")  user_info  # $meta # $meta$code # [1] 200  # $data # list()  received_profile <- user_info$data[[1]] # **error in user_info$data[[1]] : subscript out of bounds** 


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -