lookup_tweets: Get tweets data for given statuses (status IDs).

Description Usage Arguments Value References See Also Examples

View source: R/statuses.R

Description

Get tweets data for given statuses (status IDs).

Usage

1
2
3
4
5
6
7
lookup_tweets(
  statuses,
  parse = TRUE,
  token = NULL,
  retryonratelimit = NULL,
  verbose = TRUE
)

Arguments

statuses

User id or screen name of target user.

parse

If TRUE, the default, returns a tidy data frame. Use FALSE to return the "raw" list corresponding to the JSON returned from the Twitter API.

token

Expert use only. Use this to override authentication for a single API call. In most cases you are better off changing the default for all calls. See auth_as() for details.

retryonratelimit

If TRUE, and a rate limit is exhausted, will wait until it refreshes. Most twitter rate limits refresh every 15 minutes. If FALSE, and the rate limit is exceeded, the function will terminate early with a warning; you'll still get back all results received up to that point. The default value, NULL, consults the option rtweet.retryonratelimit so that you can globally set it to TRUE, if desired.

If you expect a query to take hours or days to perform, you should not rely soley on retryonratelimit because it does not handle other common failure modes like temporarily losing your internet connection.

verbose

Show progress bars and other messages indicating current progress?

Value

A tibble of tweets data.

References

https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-lookup

See Also

Other tweets: get_favorites(), get_mentions(), get_timeline(), lists_statuses(), search_tweets()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
statuses <- c(
  "567053242429734913",
  "266031293945503744",
  "440322224407314432"
)

## lookup tweets data for given statuses
tw <- lookup_tweets(statuses)
tw

## End(Not run)

mkearney/rtweet documentation built on Sept. 29, 2021, 12:01 p.m.