Learn R Programming

rtweet (version 0.7.0)

get_mentions: Get mentions for the authenticating user.

Description

Returns data on up to 200 of the most recent mentions (Tweets containing a users's screen_name) of the authenticating user.

Usage

get_mentions(
  n = 200,
  since_id = NULL,
  max_id = NULL,
  parse = TRUE,
  token = NULL,
  ...
)

Value

Tibble of mentions data.

Arguments

n

Specifies the number of Tweets to try and retrieve, up to a maximum of 200 (the default). The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied.

since_id

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occurred since the since_id, the since_id will be forced to the oldest ID available.

max_id

Character, returns results with an ID less than (that is, older than) or equal to `max_id`.

parse

Logical indicating whether to convert the response object into an R list. Defaults to TRUE.

token

Every user should have their own Oauth (Twitter API) token. By default token = NULL this function looks for the path to a saved Twitter token via environment variables (which is what `create_token()` sets up by default during initial token creation). For instruction on how to create a Twitter token see the tokens vignette, i.e., `vignettes("auth", "rtweet")` or see ?tokens.

...

Other arguments passed as parameters in composed API query.

Details

The timeline returned is the equivalent of the one seen when you view your mentions on twitter.com. This method can only return up to 800 tweets.

See Also

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

Other tweets: get_favorites(), get_my_timeline(), get_timeline(), lists_statuses(), lookup_statuses(), search_tweets(), tweets_data(), tweets_with_users()

Examples

Run this code

if (FALSE) {

## get most recent 200 mentions of authenticating user
mymentions <- get_mentions()

## view data
mymentions

}

Run the code above in your browser using DataLab