rtweet (version 0.3.0)

next_cursor: next_cursor

Description

Returns next cursor value from ids object. Return object used to retrieve next page of results from API request.

Usage

next_cursor(ids)

Arguments

ids

Data frame of Twitter IDs generated via get_followers or get_friends.

Value

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.

See Also

Other ids: get_followers, get_friends

Examples

Run this code
# NOT RUN {
# Retrieve user ids of accounts following POTUS
f1 <- get_followers("potus", n = 75000)
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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace