rehydratoR: Get tweets for given statuses (tweet IDs).

Description Usage Arguments Value Examples

View source: R/rehydratoR.R

Description

Get tweets for given statuses (tweet IDs).

Usage

1
2
rehydratoR(consumer_key, consumer_secret, access_token, access_secret,
  status_ids, base_path = NULL, group_start = 1)

Arguments

consumer_key

Consumer Key (API Key) from https://apps.twitter.com/

consumer_secret

Consumer Secret (API Secret) from https://apps.twitter.com/

access_token

Access Token from the https://apps.twitter.com/

access_secret

Access Token Secret from https://apps.twitter.com/

status_ids

data frame of tweet IDs

base_path

optional. The base path to use to save the tweets. If set, the function will write the tweets to files instead of returning the tweets as a variable.

group_start

is the group to start at after splitting list of ids. Is useful in case the download was interrupted.

Value

A tibble of tweets data if base_path is not defined. Nothing is returned if base_path is defined but the tweets are saved to a file for about every 90,0000 tweets.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Get Twitter api keys from https://apps.twitter.com
consumerKey <- ''
consumerSecret <- ''
accessToken <- ''
accessTokenSecret <- ''

# Read tweet ids
tweet_ids <- data.frame(read.table(tweet_ids_file, numerals = 'no.loss'))

# Download tweets
tweets <- rehydratoR(consumerKey, consumerSecret, accessToken, accessTokenSecret, tweet_ids)

## End(Not run)

rehydratoR documentation built on May 1, 2019, 7:44 p.m.