Skip to content

Instantly share code, notes, and snippets.

@AmeliaMN
Created November 11, 2022 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmeliaMN/c2e75ca0da51232dd2f8200646fd24c5 to your computer and use it in GitHub Desktop.
Save AmeliaMN/c2e75ca0da51232dd2f8200646fd24c5 to your computer and use it in GitHub Desktop.
Using rtweet to gather friends and followers
library(rtweet)
# need to authenticate
auth_setup_default()
# get people you follow
friends <- get_friends("AmeliaMN")
friend_screennames <- lookup_users(friends$to_id)
# get people who follow you
followers <- get_followers("AmeliaMN", n = 200000)
follower_screennames <- lookup_users(followers$from_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment