get_friends

0th

Percentile

get_friends

Requests information from Twitter's REST API regarding a user's friend network (i.e., accounts followed by a user). To request information on followers of accounts

Usage
get_friends(user, page = "-1", parse = TRUE, token = NULL)
Arguments
user

Screen name or user id of target user.

page

Default page = -1 specifies first page of json results. Other pages specified via cursor values supplied by Twitter API response object.

parse

Logical, indicating whether to return parsed vector or nested list (fromJSON) object. By default, parse = TRUE saves you the time [and frustrations] associated with disentangling the Twitter API return objects.

token

OAuth token. By default token = NULL fetches a non-exhausted token from an environment variable. Find instructions on how to create tokens and setup an environment variable in the tokens vignette (in r, send ?tokens to console).

Value

friends User ids for everyone a user follows.

See Also

https://dev.twitter.com/overview/documentation

Other ids: get_followers, next_cursor

Aliases
  • get_friends
Examples
# NOT RUN {
# get ids of users followed by the president of the US
pres <- get_friends(user = "potus")
pres

# get ids of users followed by the Environmental Protection Agency
epa <- get_friends(user = "epa")
epa
# }
# NOT RUN {
# }
Documentation reproduced from package rtweet, version 0.3.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.