Skip to content

Instantly share code, notes, and snippets.

@renatocantarino
Created August 3, 2013 18:51
Show Gist options
  • Save renatocantarino/6147565 to your computer and use it in GitHub Desktop.
Save renatocantarino/6147565 to your computer and use it in GitHub Desktop.
library("ROAuth")
library("twitteR")
options(RCurlOptions = list(capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE))
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
consumerKey <- "SEU CONSUMER KEY"
consumerSecret <- "SEU CONSUMER SECRET"
twitCred <- OAuthFactory$new(consumerKey=consumerKey,
consumerSecret=consumerSecret,
requestURL=reqURL,
accessURL=accessURL,
authURL=authURL)
twitCred$handshake(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl") )
registerTwitterOAuth(twitCred)
renato.tt <- searchTwitter('@cantarinorenato', n=50)
print(renato.tt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment