This is the start of a relatively leisurely deprecation period for twitteR
, in favor of using rtweet
. Please start looking to switch over to that package. If you have any questions contact myself or @mkearney
twitteR is an R package which provides access to the Twitter API. Most functionality of the API is supported, with a bias towards API calls that are more useful in data analysis as opposed to daily interaction.
install.packages("twitteR")
or use the github version. To do the latter:install.packages(c("devtools", "rjson", "bit64", "httr"))
library(devtools)
install_github("geoffjentry/twitteR")
twitteR
installed and can proceed:library(twitteR)
setup_twitter_oauth("API key", "API secret")
API key
and API secret
are from the Twitter app page above. This will lead you through httr
's OAuth authentication process. I recommend you look at the man page for Token
in httr
for an explanation of how it handles caching. Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.