r - Unauthorized error with ROAuth -


i using streamr package pull tweets twitter streaming api. working fine till recently. - getting error whenever handshake.

> library(roauth) > requrl <- "https://api.twitter.com/oauth/request_token" > accessurl <- "https://api.twitter.com/oauth/access_token" > authurl <- "https://api.twitter.com/oauth/authorize" > consumerkey <- "<myconsumerkey>" > consumersecret <- "myconsumersecret>" > my_oauth <- oauthfactory$new(consumerkey=consumerkey,consumersecret=consumersecret,requesturl=requrl,accessurl=accessurl,authurl=authurl) > my_oauth$handshake(cainfo = system.file("curlssl", "cacert.pem", package = "rcurl")) error: unauthorized 

i have tried recreating new application on dev.twitter.com , still same error. have tried changing callback url , access levels - no use. have tried using master branch of roauth github. idea going wrong? using r 3.0.1

i had same problem. following sequence of commands solved problem:

consumerkey <- ... consumersecret <- ... twitcred <- gettwitteroauth(consumer_key= consumerkey, consumer_secret=consumersecret) searchtwitter() 

notice didn't use registertwitteroauth(twitcred). think if wanna save , later load twitcred have use registertwitteroauth(twitcred) after loading.

i hope helps.

p.s. since using mac, didn't use cacert.pem file. think required windows.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -