rehydratoR {rehydratoR} | R Documentation |
Get tweets for given statuses (tweet IDs).
Description
Get tweets for given statuses (tweet IDs).
Usage
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
## 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)
[Package rehydratoR version 0.5.2 Index]