get_mentions: Get mentions for the authenticating user.

Description Usage Arguments Value References See Also Examples

View source: R/mentions.R

Description

Returns data on up to 200 of the most recent mentions (Tweets containing a users's screen_name) of the authenticating user. The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_mentions(
  n = 200,
  since_id = NULL,
  max_id = NULL,
  parse = TRUE,
  retryonratelimit = NULL,
  verbose = TRUE,
  token = NULL,
  ...
)

Arguments

n

Desired number of results to return. Results are downloaded in pages when n is large; the default value will download a single page. Set n = Inf to download as many results as possible.

The Twitter API rate limits the number of requests you can perform in each 15 minute period. The easiest way to download more than that is to use retryonratelimit = TRUE.

You are not guaranteed to get exactly n results back. You will get fewer results when tweets have been deleted or if you hit a rate limit. You will get more results if you ask for a number of tweets that's not a multiple of page size, e.g. if you request n = 150 and the page size is 200, you'll get 200 results back.

since_id

Supply a vector of ids or a data frame of previous results to find tweets newer than since_id.

max_id

Supply a vector of ids or a data frame of previous results to find tweets older than max_id.

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.

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?

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.

...

Other arguments passed as parameters in composed API query.

Value

Tibble of mentions data.

References

https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-mentions_timeline

See Also

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

Examples

1
2
3
4
5
6
7
8
## Not run: 
tw <- get_mentions()
tw

# newer mentions
get_mentions(since_id = tw)

## End(Not run)

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