get_tweets: This function allows you to collect tweets with there...

View source: R/get_tweets.R

get_tweetsR Documentation

This function allows you to collect tweets with there status_id (max 100 tweet ids per call)

Description

This function allows you to collect tweets with there status_id (max 100 tweet ids per call)

Usage

get_tweets(
  token = NA,
  tweet_ids = NA,
  tweet_fields = "ALL",
  user_fields = "ALL",
  api_wait = 12,
  expansions = "ALL",
  place_fields = "ALL",
  media_fields = "ALL",
  poll_fields = "NONE",
  JSON = FALSE,
  storage_path = "get_tweets_by_ids.json",
  n_try = 10
)

Arguments

token

string of the bearer token from your personal twitter API access

tweet_ids

string representing the query to search tweets with

tweet_fields

string which defaults to ALL (no other argument accepted at the moment)

user_fields

string which defaults to ALL (no other argument accepted at the moment)

api_wait

integer specifying how long the function should wait for the API to answer (defaults to 12 seconds)

expansions

string which defaults to ALL (no other argument accepted at the moment)

place_fields

string which defaults to ALL (no other argument accepted at the moment)

media_fields

string which defaults to ALL (no other argument accepted at the moment)

poll_fields

string which defaults to NONE (no other argument accepted at the moment)

JSON

boolean which defaults to FALSE

storage_path

character string specifying the path and file name to write the json file to

n_try

integer specifying number of retries in case of 503 error

Value

a data frame

Examples

## Not run: 
users <- get_tweets(token=bearer_token, tweet_ids = "123456789458,45678988975744")

## End(Not run)

MaelKubli/RTwitterV2 documentation built on May 26, 2023, 5:29 p.m.