Learn R Programming

voson.tcn (version 0.5.0)

tcn_tweets: Get tweets

Description

Collects tweets for a list of tweet ids.

Usage

tcn_tweets(
  tweet_ids = NULL,
  token = NULL,
  referenced_tweets = FALSE,
  retry_on_limit = TRUE,
  clean = TRUE,
  verbose = TRUE
)

Value

A named list. Dataframes of tweets, users, errors and request metadata.

Arguments

tweet_ids

List. Tweet ids or tweet URLs.

token

List. Twitter API tokens.

referenced_tweets

Logical. Also retrieve tweets referenced by requested tweets. Default is FALSE.

retry_on_limit

Logical. When the API v2 rate-limit has been reached wait for reset time. Default is TRUE.

clean

Logical. Clean results.

verbose

Logical. Output additional information. Default is TRUE.

Examples

Run this code
if (FALSE) {
# get twitter conversation threads by tweet ids or urls
tweet_ids <- c("xxxxxxxx",
               "https://twitter.com/xxxxxxxx/status/xxxxxxxx")
tweets <- tcn_tweets(tweet_ids, token)
}

Run the code above in your browser using DataLab