Function will enable a user to access the Twitter API through the [Twitter Developers Account](https://dev.twitter.com/) site. Once a user has a Twitter developers account and has received their individual consumer key, consumer secret key, access token, and access secret they can acquire Tweets based on a list of hashtags and a requested number of entries per query.
tweet_acquire(
twitter_app,
consumer_api_key,
consumer_api_secret_key,
access_token,
access_token_secret,
query,
num_tweets,
reduced_tweets = TRUE,
distinct = TRUE
)
A Data Frame with tweets and meta data.
The name of user created Twitter Application.
Twitter Application management consumer API key.
Twitter Application management consumer API
secret key. Application must have Read and write
access level and
Callback URL
of http://127.0.0.1:1410
.
Twitter Application management access token (apps.twitter.com).
Twitter Application management access secret token (apps.twitter.com).
A single query or a list of queries the user has specified.
Character string, not to exceed 500 characters. To search for tweets
containing at least one of multiple possible terms, separate each search
term with spaces and "OR" (in caps). For example, the search q =
"data science"
looks for tweets containing both "data" and "science"
located anywhere in the tweets and in any order. When "OR" is entered
between search terms, query = "data OR science"
, Twitter's REST API
should return any tweet that contains either "data" or "science."
Number of Tweets to be acquired per each hashtag.
Logical. If reduced_tweets = TRUE, the data frame returned to the user will be significantly reduced specifically for use in the `saotd` package. If reduced_tweets = FALSE, the full results from the Twitter API will be returned.
Logical. If distinct = TRUE, the function removes multiple Tweets that originate from the same Twitter id at the exact same time.