Dorris Scott
3/28/2018
Install the rtweet package and load it.
install.packages("rtweet")
library(rtweet)
If you are getting error messages about packages missing then:
install.packages("rtweet", dependencies = TRUE)
library(rtweet)
What is Leaflet?
Make sure to take note of these things when you're making your Twitter app!
##whatever name you assigned to your created app
appname <- ""
##api key
key <- ""
##api secret
secret <- ""
##create token named "twitter_token"
twitter_token <- create_token(
app = appname,
consumer_key = key,
consumer_secret = secret)
FMTweets <- search_tweets("farmers market", n = 1000, include_rts = FALSE, geocode = lookup_coords("georgia"))
Let's see who's tweeting about lunch right now!
Tip: Choose the appropriate meal for the appropriate time of day ;)
t<- 60 * 5
lunchstream <- stream_tweets("lunch", timeout = t)
t <- 30
means to search for tweets for 30 seconds.
t <- 60 * 3
means to search for tweets for three minutes.
t <- 60 * 60 * 24
means to search for tweets for a period of one day.
Try doing a Twitter search about breakfast, lunch, or dinner!