Skip to content

Instantly share code, notes, and snippets.

@WilsonMongwe
Last active October 7, 2017 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WilsonMongwe/3a6e9068da567d7d53fe3ca71d5fecda to your computer and use it in GitHub Desktop.
Save WilsonMongwe/3a6e9068da567d7d53fe3ca71d5fecda to your computer and use it in GitHub Desktop.
#Creating a twitter authentication in R
#The infomation can be found under the "Keys and Acces Tokens" tab of your twitter aplication.
api_key <- "Enter your API key here" #This is called the: Consumer Key (API Key)
api_secret <- "Enter your secret API key here" #This is called the: Consumer Secret (API Secret)
access_token <- "Enter your access token here" #This is called the: Access Token
access_token_secret <- "Enter your secret access token here" #This is called the: Access Token Secret
#Run this code to set up the twitter authentication.
setup_twitter_oauth(api_key,api_secret,access_token,access_token_secret)
#Run this code to ckec if the authetication was succesfull
searchTwitter("JSE")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment