Instantly share code, notes, and snippets.

Embed
What would you like to do?
#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