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

Description Usage Arguments Author(s) Examples

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

1
2
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.

cursor

See https://dev.twitter.com/docs/api/1.1/get/friends/ids

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.

Author(s)

Pablo Barbera pablo.barbera@nyu.edu

Examples

1
2
3
4
5
## Not run: 
## Download list of friends of user "p_barbera"
 friends <- getFriends(screen_name="p_barbera", oauth_folder="oauth")

## End(Not run)

SMAPPNYU/smappR documentation built on May 9, 2019, 11:19 a.m.