View source: R/build_queryv2.R
build_query | R Documentation |
Build tweet query according to targeted parameters.
build_query(
query = NULL,
exact_phrase = NULL,
users = NULL,
reply_to = NULL,
retweets_of = NULL,
exclude = NULL,
is_retweet = NULL,
is_reply = NULL,
is_quote = NULL,
is_verified = NULL,
remove_promoted = FALSE,
has_hashtags = NULL,
has_cashtags = NULL,
has_links = NULL,
has_mentions = NULL,
has_media = NULL,
has_images = NULL,
has_videos = NULL,
has_geo = NULL,
place = NULL,
country = NULL,
point_radius = NULL,
bbox = NULL,
lang = NULL,
conversation_id = NULL,
url = NULL
)
query |
string or character vector, search query or queries |
exact_phrase |
If |
users |
string or character vector, user handles to collect tweets from the specified users |
reply_to |
string or character vector, user handles to collect replies to the specified users |
retweets_of |
string or character vector, user handles to collects retweets of tweets by the specified users |
exclude |
string or character vector, tweets containing the keyword(s) will be excluded |
is_retweet |
If |
is_reply |
If |
is_quote |
If |
is_verified |
If |
remove_promoted |
If |
has_hashtags |
If |
has_cashtags |
If |
has_links |
If |
has_mentions |
If |
has_media |
If |
has_images |
If |
has_videos |
If |
has_geo |
If |
place |
string, name of place e.g. "London" |
country |
string, name of country as ISO alpha-2 code e.g. "GB" |
point_radius |
numeric, a vector of two point coordinates latitude, longitude, and point radius distance (in miles) |
bbox |
numeric, a vector of four bounding box coordinates from west longitude to north latitude |
lang |
string, a single BCP 47 language identifier e.g. "fr" |
conversation_id |
string, return tweets that share the specified conversation ID |
url |
string, url |
This function is already called within the main
get_all_tweets
function.
It may also be called separately and the output saved as
a character object query string to be input as query parameter to get_all_tweets
.
a query string
## Not run:
query <- build_query(query = "happy", is_retweet = FALSE,
country = "US",
place = "seattle",
point_radius = c(-122.33795253639994, 47.60900846404393, 25),
lang = "en")
query <- build_query(query = "twitter",
point_radius = c(-122.33795253639994, 47.60900846404393, 25),
lang = "en")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.