get_friends | R Documentation |
Returns a list of user IDs for the accounts following BY one or more specified users.
get_friends(
users,
n = 5000,
retryonratelimit = NULL,
cursor = "-1",
parse = TRUE,
verbose = TRUE,
token = NULL,
page = lifecycle::deprecated()
)
users |
Screen name or user ID of target user from which the user IDs of friends (accounts followed BY target user) will be retrieved. |
n |
Desired number of results to return. Results are downloaded
in pages when The Twitter API rate limits the number of requests you can perform
in each 15 minute period. The easiest way to download more than that is
to use You are not guaranteed to get exactly |
retryonratelimit |
If If you expect a query to take hours or days to perform, you should not
rely solely on |
cursor |
Which page of results to return. The default will return the first page; you can supply the result from a previous call to continue pagination from where it left off. |
parse |
If |
verbose |
Show progress bars and other messages indicating current progress? |
token |
Use this to override authentication for
a single API call. In many cases you are better off changing the
default for all calls. See |
page |
Generally, you should not need to set n
to more than 5,000 since Twitter
limits the number of people that you can follow (i.e. to follow more than
5,000 people at least 5,000 people need to follow you).
A tibble data frame with two columns, "from_id" for name or ID of target user and "to_id" for accounts ID they follow.
If a user is protected the API will omit all requests so you'll need
to find which user is protected. rtweet will warn you and the output will be NA
.
rtweet-deprecated
if (FALSE) {
get_friends("ropensci")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.