Skip to content

Instantly share code, notes, and snippets.

@alstat
Last active July 13, 2019 06:07
Show Gist options
  • Save alstat/9656597 to your computer and use it in GitHub Desktop.
Save alstat/9656597 to your computer and use it in GitHub Desktop.
library(RCurl)
# Set SSL certs globally
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
library(twitteR)
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
apiKey <- "xxxxxxxxxxxxxxxxxxxxxx"
apiSecret <- "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
twitCred <- OAuthFactory$new(
consumerKey = apiKey,
consumerSecret = apiSecret,
requestURL = reqURL,
accessURL = accessURL,
authURL = authURL
)
twitCred$handshake(
cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")
)
registerTwitterOAuth(twitCred)
@Andrevw2812
Copy link

Thanks sickopath, your solution (and mis6036) worked perfectly.

@kaivan-s
Copy link

Thanks mis6306, Solution working good !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment