ROAuth no longer used in favor of httr? [Twitter API]

SPi picture SPi · Aug 28, 2013 · Viewed 14.5k times · Source

I'm running R Studio on an AWS "Ubuntu Server 12.04.2 LTS" and accessing R Studio via my browser.

When I try to authenticate at the Twitter API using the package ROAuth with the code:

credential<-OAuthFactory$new(consumerKey="xxxxx",
                             consumerSecret="xxxxx",
                             requestURL="https://api.twitter.com/oauth/request_token",
                             accessURL="https://api.twitter.com/oauth/access_token",
                             authURL="https://api.twitter.com/oauth/authorize")

credential$handshake()
registerTwitterOAuth(credential)

I get an error after registerTwitterOAuth(credential) saying

  Error in registerTwitterOAuth(credential) : 
  ROAuth is no longer used in favor of httr, please see ?setup_twitter_oauth

However I can't find any further explanation..

Answer

SPi picture SPi · Aug 28, 2013

Apparently the twitteR package was changed right before I posted this, so the new way to authenticate is

setup_twitter_oauth(CUSTOMER_KEY, CUSTOMER_SECRET, ACCESS_TOKEN, ACCESS_secret, credentials_file=NULL)

see https://github.com/geoffjentry/twitteR