Description Usage Arguments Details Value
safe_get_timelines()
is a drop-in replacement for
rtweet::get_timelines()
that automatically respects
Twitter API rate limits and coordinates use of
multiple Twitter access tokens that have been
registered with register_token()
. At the moment
you can only request the friends list of 15 or
fewer users in a single call.
1 | safe_get_timelines(user, n = 100, max_id = NULL, home = FALSE, attempts = 5)
|
user |
Vector of user names, user IDs, or a mixture of both. |
n |
Number of tweets to return per timeline. Defaults to 100. Must be of length 1 or equal to length of user. This number should not exceed 3200 as Twitter limits returns to the most recent 3,200 statuses posted or retweeted by each user. |
max_id |
Character, returns results with an ID less than (that is, older than) or equal to 'max_id'. |
home |
Logical, indicating whether to return a user-timeline
or home-timeline. By default, home is set to FALSE, which means
|
attempts |
How many times should we attempt to access the Twitter API before giving up? Defaults to 5. |
If no tokens have been registered with socialsampler
,
safe_get_timelines()
will look for a token registered
with rtweet
and use that token instead, again
automatically respecting rate limits. If no tokens have
been registered with either socialsampler
or rtweet
,
you'll get an error.
A tbl data frame of tweets data with users data attribute.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.