Learn R Programming

rtweet (version 0.7.0)

get_my_timeline: Get your timeline

Description

Returns a collection of the most recent Tweets and Retweets posted by the authenticating user and the users they follow. The home timeline is central to how most users interact with the Twitter service.

The authenticating user is determined from the token.

Usage

get_my_timeline(
  n = 100,
  max_id = NULL,
  parse = TRUE,
  check = TRUE,
  token = NULL,
  ...
)

Value

A tbl data frame of tweets data with users data attribute.

Arguments

n

Number of tweets to return per timeline. Defaults to 100. Must be of length 1 or equal to length of user.

max_id

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

parse

Logical, indicating whether to return parsed (data.frames) or nested list object. By default, parse = TRUE saves users from the time (and frustrations) associated with disentangling the Twitter API return objects.

check

Logical indicating whether to remove check available rate limit. Ensures the request does not exceed the maximum remaining number of calls. 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.

...

Further arguments passed on as parameters in API query.

See Also

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

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

Examples

Run this code

if (FALSE) {

tweets_from_me_and_the_ppl_i_follow <- get_my_timeline(n = 3200)

}

Run the code above in your browser using DataLab