twitSmany2json: Write many Twitter search requests to JSON file

Description Usage Arguments Examples

Description

Used to extract many repeated requests to pull searchs and save the results to a json file. Will automatically move from most recent toward older tweets while pulling data.

Usage

1
2
3
twitSmany2json(filename, twitter_token, n = 5000, my_oauth = NULL, q = "",
  geocode = NULL, lang = NULL, result_type = NULL, until = NULL,
  since_id = NULL, max_id = NULL, verbose = TRUE, append_old = FALSE)

Arguments

filename

Character. File path to json file to store data.

twitter_token

Your twitter_token; e.g. from twitToken() function.

n

(optional) Integer. Maximum total tweets to pull from the timeline.

verbose

(defaults TRUE) Logical. If true, displays request limit at each request.

append_old

(defaults FALSE) Logical. If true will append an already extant json file; otherwise it creates/overwrites file.

q=”,

geocode, lang, result_type, until, since_id, max_id To set up query. See ?twitSQuery for details

Examples

1
2
twitter_token <- twitToken(consumer_key, consumer_secret, access_token, access_secret)
twitSmany2json(filename='~/thomas_laetsch.json', twitter_token = twitter_token, q = 'thomas laetsch uconn OR nyu')

Tom-Laetsch/Rtwit documentation built on May 9, 2019, 4:52 p.m.