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)
numeric; the unique id to identify an Instagram user which can be
found in the
integer; the unique id identifying the oldest post that you would want to retrieve in this function call
logical; do you want to return the results as a
logical; do you want to paginate through results or just return the first page?
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.
logical; do you want informative messages?
bieber_user_id <- ig_get_user_id("justinbieber")#> 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