get_store.Rd
Retrieves all tweets of a keyword provided by the user through the Twitter API. Alternatively the user can directly read from a structured Json response based on the Twitter API. If the user plans to access to the Twitter API they must have a personal bearer token and store it as an environment variable to access it.
get_store(
bearer_token,
keyword,
start_date,
end_date,
max_results = 25,
store_path = "/output/",
store_csv = TRUE,
include_public_metrics = TRUE,
api_access_lvl = "essential"
)
The user's personal twitter API dev bearer token. It is recommended to add the token from an environment variable.
The keyword to search Twitter and retrieve tweets.
Starting date to collect tweets from. Dates should be entered in string format: YYYY-MM-DD
Ending date (Included) to collect tweets from. Dates should be entered in string format: YYYY-MM-DD
The maximum number of tweets to return. Default is 25.Must be between 10 and 100.
The string path to store the retrieved tweets in Json format. Default is working directory.
Create .csv file with response data or not. Default is False.
Should public metrics regarding each tweet such as impression_count, like_count, reply_count, retweet_count, url_link_clicks and user_profile_clicks be downloaded and stored. Default is True.
The twitter API access level of the user's bearer token. Options are 'essential' or 'academic'. Default is 'essential'
dataframe A dataframe of retrieved tweets based on user's selected parameters. (Data will be stored as a Json file)