1

Below is my R script for fetching a particular hashtag trending on twitter. I do have the APIs, and the access tokens.

library(rtweet)

api <- " "
api_secret <- " "
bearerToken <- " "
accessToken <- " "
secretaccessToken <- " "
appname <- " "


# Login - using rtweet
create_token(
  app = appname,
  consumer_key = api,
  consumer_secret = api_secret,
  access_token = accessToken,
  access_secret = secretaccessToken)

tweets <- search_tweets(
  q="#Hashtag", 
  n = 200,
)

When I run this code, I get a warning saying that

"you currently have Essential access which includes access to Twitter API v2 endpoints only"

On TwitterDev, I've checked that I have the essential access. What else could I be missing?

andy
  • 1,947
  • 5
  • 27
  • 46
  • 1
    I don't interpret the error to suggest you don't have it. I interpret the error to mean that your current level does not include some/most/all of the API hits that `rtweet` is using. See https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api for a breakdown of API comparisons across access levels. – r2evans Dec 02 '21 at 19:34
  • 1
    Perhaps this means `rtweet` needs to be updated to use (more) `v2` API endpoints? I don't use it, so I'm just speculating. – r2evans Dec 02 '21 at 19:36
  • Which package do you use? – andy Dec 02 '21 at 19:39
  • My familiarity is more with `jsonlite` and `httr` and some APIs in general, not at all with `rtweet`. I don't analyze tweets, so I know nothing more. – r2evans Dec 02 '21 at 19:42

0 Answers0