Load Libraries. # Load libraries. library(twitteR) library(ROAuth) library(tm) ## Loading required package: NLP library(SnowballC) library(stringi) ## Warning: package 'stringi' was built under R version 3.4.4 library(wordcloud) ## Loading required package: RColorBrewer Twitter in R. We first need to authenticate our access to Twitter using the setup_twitter_oath function. I have loaded my credentials contained within the t.api.key and t.api.secret objects.
# Authenticate Twitter session load(file = "twitter_credentials") setup_twitter_oauth(t.api.key, t.api.secret, access_token = NULL, access_secret = NULL) ## [1] "Using browser based authentication" # Search for two countries, Italy and France.
Read more…