These function returns all of the followers or users that a specific user is following
ig_get_followers(user_id, max_id = NULL, return_df = TRUE, paginate = TRUE, max_pages = 10, verbose = FALSE) ig_get_following(user_id, max_id = NULL, return_df = TRUE, paginate = TRUE, max_pages = 10, verbose = FALSE)
user_id | numeric; the unique id to identify an Instagram user which can be
found in the |
---|---|
max_id | integer; the unique id identifying the oldest post that you would want to retrieve in this function call |
return_df | logical; do you want to return the results as a |
paginate | logical; do you want to paginate through results or just return the first page? |
max_pages | integer; a limit to the number of pages to retrieve from paginated endpoints. Instagram feeds have the potential to paginate forever, so by default we stop after pulling 10 pages. If you would like more or less pages returned, then modify this argument. |
verbose | logical; do you want informative messages? |
#> Error: Status: fail #> Message: login_required# By default, ig_get_followers will retrieve the top 10 pages of follower data. # This is because IG users like Justin Bieber have 100M+ followers, so it could # take a long time to pull. If you would really like to get all users, then set # the max_pages argument to Inf. bieber_followers <- ig_get_followers(bieber_user_id)#> Error in check_user_id(user_id): object 'bieber_user_id' not foundbieber_following <- ig_get_following(bieber_user_id)#> Error in check_user_id(user_id): object 'bieber_user_id' not found