0

I have academic access to Twitter. Since the Twitter policy changes, I cannot authenticate (I was able to do so before, using the default authentication method). Since the default authentication method no longer works, I am using the app authentication method described here: https://cran.r-project.org/web/packages/rtweet/vignettes/auth.html

I ran the follow code:

library("rtweet")
library("httpuv")
auth <- rtweet_app()
df <- search_tweets("#rstats", token = auth)

The last line returns

Error: Twitter API failed [401]. Check error message at https://developer.twitter.com/en/support/twitter-api/error-troubleshooting 
 * Invalid or expired token. (89)

What am I missing? I would appreciate any help folks could give me. I'm still new at this. Thanks!

alter_igel
  • 6,899
  • 3
  • 21
  • 40

1 Answers1

0

The error seems to indicate that the token is invalid, you should get a new one via the https://developer.twitter.com website and use that instead. However, it is no longer possible to search Twitter using the API without paying at least the Basic plan.

llrs
  • 3,308
  • 35
  • 68