I'm trying to use the rtweet-package to download some tweets from a certain hashtag. I've used a guide from a place called OpenCodez, and I've run into problems
Using the "search_tweets" function of the rtweet-package, I'm not able to download more than 5 tweets, while the limit of rtweet should be around 18.000 tweets.
I don't get any errors, but the "Downloading"-graphic when running my script simply stops at 10% (when trying to download n=2000).
I've tried using the "retryonratelimit=TRUE" without luck. I've reset my script, tried different tutorials to establish a connection - which all work fine - up until I'm actually using the search_tweets-function.
So this is my code to connect to the API:
api_key <- "xxxx"
api_secret_key <- "xxxx"
access_token <- "xxxx"
access_token_secret <- "xxxx"
## authenticate via web browser
token <- create_token(
app = "xxxx",
consumer_key = api_key,
consumer_secret = api_secret_key,
access_token = access_token,
access_secret = access_token_secret)
And this is my "scraper":
my_tweets = search_tweets("#vmd19", n=2000, lang='en')
The resulting data-frame is simply 5 columns, which is odd, when there should be at least a couple of hundred tweets under the hashtag. I've tried different queries (hashtags etc.), without luck. The download stops looking like this:
Downloading [===>-------------------------------------] 10%
I cannot figure out what I'm doing wrong. Hopefully, someone can help me troubleshoot this!