Description Usage Arguments Value See Also Examples
Method for returning next value (used to request next page or results) object returned from Twitter APIs.
Paginate in reverse (limited integration)
Get the newest ID collected to date.
1 2 3 4 5 6 7 | next_cursor(x)
max_id(.x)
previous_cursor(x)
since_id(.x)
|
x |
Data object returned by Twitter API. |
.x |
id |
Character string of next cursor value used to retrieved
the next page of results. This should be used to resume data
collection efforts that were interrupted by API rate limits.
Modify previous data request function by entering the returned
value from next_cursor
for the page
argument.
Other ids:
get_followers()
,
get_friends()
Other extractors:
tweets_data()
,
users_data()
Other ids:
get_followers()
,
get_friends()
Other extractors:
tweets_data()
,
users_data()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
## Retrieve user ids of accounts following POTUS
f1 <- get_followers("potus", n = 75000)
## store next_cursor in page
page <- next_cursor(f1)
## max. number of ids returned by one token is 75,000 every 15
## minutes, so you'll need to wait a bit before collecting the
## next batch of ids
sys.Sleep(15 * 60) ## Suspend execution of R expressions for 15 mins
## Use the page value returned from \code{next_cursor} to continue
## where you left off.
f2 <- get_followers("potus", n = 75000, page = page)
## combine
f <- do.call("rbind", list(f1, f2))
## count rows
nrow(f)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.