I'm trying to retrieve some historical tweets with rTweet and I'm getting a very rough error when using the search_fullarchive and search_30 days function. This does NOT happen when searching for non-historical tweets. I have an academic API and I am far away from the daily and monthly limit. Even with this example:
rt <- search_fullarchive("#rstats", env_name = "Myenvironment", fromDate = "201401010000", toDate = "201401012359")
I get this error>
Error: Twitter API failed [403] Check error message at https://developer.twitter.com/en/support/twitter-api/error-troubleshooting
The website does not clarify how I should proceed. Any ideas?
What you need is to use the package
academictwitteR
. Here is the official documentation . The problem with the packagerTweet
is that it does not deliver the historical tweets, since the updates in the Twitter API restricted access and it is only possible through the packageacademictwitteR
. The packagerTweet
gives you a sample of tweets from the last 7-9 days counting from the day of the call. Instead withacademictwitteR
you can get all the tweets (as long as you have the academic API).Here is an example of how to access historical tweets following your example:
You can replace the get_bearer() variable with the key "AAAAA....". But if you follow the steps in the installation and documentation of the package
academictwitteR
there should be no problems.