r - OAuth Pin Returns [1] -


i've been pulling twitter month using following code library (rcurl) library (twitter) library (streamr) library (roauth)

requesturl<-"https://api.twitter.com/oauth/request_token" accessurl <- "https://api.twitter.com/oauth/access_token" authurl ="https://api.twitter.com/oauth/authorize" consumerkey= "my key" consumersecret = "my secret" cred <-oauthfactory$new(consumerkey=consumerkey,consumersecret=consumersecret,requesturl=requesturl,accessurl=accessurl,authurl=authurl) cred$handshake (cainfo=system.file("curlssl","cacert.pem",package ="rcurl")) 

usually works, times follow hyperlink pin, paste pin , [1] in return. no matter write, keep getting [1]. when try submit request, i'm told requires oauth (below). doing wrong? thank help!

error in twinterfaceobj$doapicall(cmd, params, "get", ...) :  oauth authentication required twitter's api v1.1 

if keep need every time want twitter data streamr package r. in code, add following:

save(credentials, file="credentials.rdata") 

this save credentials in file called credentials.rdata. thing have every time want new twitter data load file doing following:

library(twitter) load("credentials.rdata") registertwitteroauth(credentials) 

hope helps!


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -