Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


smappR (version 0.5)

getFriends: Returns the list of user IDs a given Twitter user follows

Description

getFriends connects to the REST API of Twitter and returns the list of user IDs a given user follows. Note that this function allows the use of multiple OAuth token to make the process more efficient.

Usage

getFriends(screen_name = NULL, oauth_folder, cursor = -1, user_id = NULL, verbose = TRUE, sleep = 1)

Arguments

screen_name
user name of the Twitter user for which their friends will be downloaded
oauth_folder
folder where OAuth tokens are stored.
user_id
user id of the Twitter user for which their friends will be downloaded
verbose
If TRUE, prints information about API calls on console
sleep
Number of seconds to sleep between API calls.

Examples

Run this code
## Not run: 
# ## Download list of friends of user "p_barbera"
#  friends <- getFriends(screen_name="p_barbera", oauth_folder="oauth")
# ## End(Not run)

Run the code above in your browser using DataLab