Skip to content

Instantly share code, notes, and snippets.

@briatte
Created April 2, 2015 17:51
Show Gist options
  • Save briatte/55d28dea7ae56ae05584 to your computer and use it in GitHub Desktop.
Save briatte/55d28dea7ae56ae05584 to your computer and use it in GitHub Desktop.
library(ROAuth)
requestURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
# replace XYZ with your Twitter API consumer key
consumerKey <- "XYZ"
# replace ... with your Twitter API consumer secret
consumerSecret <- "XYZ"
my_oauth <- OAuthFactory$new(consumerKey = consumerKey, consumerSecret = consumerSecret,
requestURL = requestURL, accessURL = accessURL, authURL = authURL)
my_oauth$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))
# replace XYZ with your screen name
save(my_oauth, file = "oauth_XYZ.rda")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment