Skip to content

Instantly share code, notes, and snippets.

@malcolmbarrett
Last active January 27, 2019 17:07
Show Gist options
  • Save malcolmbarrett/46dfce8354013d052fd4619ccc571611 to your computer and use it in GitHub Desktop.
Save malcolmbarrett/46dfce8354013d052fd4619ccc571611 to your computer and use it in GitHub Desktop.
A short script to sample from retweets and quote tweets
retweets <- rtweet::get_retweets("1088462271175708672", token = token)
quote_tweets <- rtweet::search_tweets(
"https://twitter.com/EpiEllie/status/1088462271175708672",
n = 100,
type = "recent",
include_rts = FALSE,
token = token
)
dplyr::bind_rows(retweets, quote_tweets) %>%
dplyr::sample_n(1) %>%
dplyr::pull(screen_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment