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!