I am having problems with the setup_twitter_oauth() function. I ran the following code and it worked for me without errors.
library(RCurl) require(twitteR) 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" api_Key <- "XXXXXXX" api_Secret <- "XXXXXXXXXXXXXXXXX" twitCred <- OAuthFactory$new(consumerKey=api_key, consumerSecret=api_secret, requestURL=reqURL, accessURL=accessURL, authURL=authURL ) twitCred$handshake()
EDIT:
Itβs just that the problems that I had with my access_token application are sorted out now, now the setup_twitter_oauth function works fine.
Try using the code below to authenticate Twitter with R if your api_key , api_secret , acsess_token , access_token_secret generated without errors.
api_key = "XXXXXXXXX"
source share