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, token = NULL, page = "-1", stringify = TRUE)
Arguments
user
Screen name or user id of target user.
token
OAuth token (1.0 or 2.0). By default token = NULL fetches a non-exhausted token from an environment variable.
page
Numeric or character vector used as cursor value. Default page = -1 specifies first page of json results, or first 5000 friends. Other pages specified via cursor values supplied by Twitter API response object.
stringify
Logical, indicating whether to return user ids as strings (some ids are too long to be read as numeric). Defaults to TRUE.
Value

friends User ids for everyone a user follows.

See Also

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

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
# ## End(Not run)

Documentation reproduced from package rtweet, version 0.1.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.