Streams public statuses to a file via one of the following four methods:
Sampling a small random sample of all publicly available tweets
Filtering via a search-like query (up to 400 keywords)
Tracking via vector of user ids (up to 5000 user_ids)
Location via geo coordinates (1-360 degree location boxes)
Learn more in vignette("stream", package = "rtweet")
stream_tweets(
q = "",
timeout = 30,
parse = TRUE,
token = NULL,
file_name = NULL,
verbose = TRUE,
append = TRUE,
...
)
A tibble with one row per tweet
Query used to select and customize streaming collection method. There are four possible methods:
The default, q = ""
, returns a small random sample of all
publicly available Twitter statuses.
To filter by keyword, provide a comma separated character string with the desired phrase(s) and keyword(s).
Track users by providing a comma separated list of user IDs or screen names.
Use four latitude/longitude bounding box points to stream by geo
location. This must be provided via a vector of length 4, e.g.,
c(-125, 26, -65, 49)
.
Integer specifying number of seconds to stream tweets for.
Stream indefinitely with timeout = Inf
.
The stream can be interrupted at any time, and file_name
will still be
valid file.
Use FALSE
to opt-out of parsing the tweets.
Use this to override authentication for
a single API call. In many cases you are better off changing the
default for all calls. See auth_as()
for details.
Character with name of file. If not specified,
will write to a temporary file stream_tweets*.json
.
If TRUE
, display a progress bar.
If TRUE
, will append to the end of file_name
; if
FALSE
, will overwrite.
Other arguments passed in to query parameters.
They were removed from the website.
The webpages describing how it used to work were removed.
filtered_stream()
, rtweet-deprecated