I am trying to authenticate Rstudio to Twittter using twitteR.
I only error after the handshake.
My code is:
#install(rcurl, ROAuth, twitteR)
#load(rcurl, ROAuth, twitteR)
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
consumerKey <- "key"
consumerSecret <- "secret key"
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
twitCred$handshake()
I get the handshake and it send me to the auth page for Twitter. I authorize and get a pin.
I enter the pin in this code:
registerTwitterOAuth(pin number here)
Then I am returned with a "Error: Unauthorized".
I added a new Twitter application account and got a different set of customer keys, but still got the same.