get_followers_fast: Wrapper for rtweet::get_followers and rtweet::lookup_users

View source: R/get_followers_and_friends_fast.R

get_followers_fastR Documentation

Wrapper for rtweet::get_followers and rtweet::lookup_users

Description

This function consolidates the process of getting followers and looking up the user details, It also adds a column for follower number, the earliest follow date and the account screen_name being followed.

Usage

get_followers_fast(account_for_foll, token_list = c(NULL), file_path = NULL)

Arguments

account_for_foll

Required. The target twitter account user_id or screen_name - in quotes. NB:Only tested with a single account: iterating tokens may not work effectively with multiple accounts, however, using lapply or purrr::map to iterate over user accounts is feasible.

token_list

Optional. A list of valid tokens loaded into environment. Not specifying will use the default token. If multiple tokens are specified, function will iterate through them to reduce rate-limit pauses for followings larger than 75000 NB: this may be contrary to Twitter's API terms and conditions - so use at own risk.

file_path

Optional. If specified, an rds file will be saved to the file path in the form <file_path><account_for_foll>_followers.rds #'@keywords twitter, rtweet

Examples

jacks_followers <- get_followers_fast("arfness",token_list = c(NULL), file_path = "~/")

Arf9999/rtweetXtras documentation built on June 27, 2022, 5:10 a.m.