Description Usage Arguments Details Value
Automate the collection of friend IDs for a large number of users (via
get_friends
)
1 | get_friends_download(x, ..., output = NULL, verbose = TRUE)
|
x |
Either a data frame or character vector containing user identifiers for which friends IDs will be retrieved. See details for more information about how this works. |
... |
If |
output |
Optionally supply a preexisting output vector (like that returned by this function)–if NULL, the default, this function will start fresh. |
verbose |
Whether the function should print information/status updates, defaults to TRUE. Setting this to FALSE will silent most printing. |
This function attempts to retrieve friends IDs for as many as 15 to 30 users every 15 minutes, sleeping between calls until Twitter's API rate limit resets. If your API token is linked to your own Twitter APP and has appropriate permissions to create a 'bearer token', then this function will make 30 calls every 15 minutes. If the token cannot be used via bearer authorization, then 15 calls are made every 15 minutes.
It's worth noting that 15 calls does not mean 15 complete friend IDs. Twitter limits the number of returned friends returned by a single call to 5,000, which is more friends than 95% of Twitter users, but at times is frustrating because some users like Senator Amy Klobuchar follow over 170,000 accounts–that many accounts can take 45 mintues to collect! It's interesting, though, that Amy Klobuchar is also unusually prolific in both following Twitter users and writing/sponsoring legislation.
Returns a list data frames with user and friend ID information. See
get_friends
for more information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.