Hi,
I’m trying to retrieve my data with R using twitteR library. This is my code:
library(ROAuth)
library(twitteR)
api_key <- "###########"
api_secret <- “########”
download.file(url=“http://curl.haxx.se/ca/cacert.pem”, destfile=“cacert.pem”, method=“curl”)
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- “https://api.twitter.com/oauth/authorize”
twitCred <- OAuthFactory$new(consumerKey=api_key,
consumerSecret=api_secret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
twitCred$handshake(cainfo = system.file(“CurlSSL”, “cacert.pem”, package = “RCurl”))
registerTwitterOAuth(twitCred)
but the handshake give me this error:
“Errore: Unauthorized”
what’s the problem?
I’m on a linux based OS and running R with RStudio