I am not sure about why does my call doesn’t work, even if I already did all the things the documentation shows for the rtweet library. Need some help, pretty sure it somenthing very obvious that I am missing, but I am really lost
#install.packages("rtweet")
library(jsonlite)
library(httr)
library(tidyverse)
library(rtweet)
Sys.setenv(BEARER_TOKEN = "bearer token")
bearer_token <- "bearer token"
headers <- c(`Authorization` = sprintf('Bearer %s', bearer_token))
keywords <- "(debate OR debates OR monterrey)"
endpoint <- "https://api.twitter.com/2/tweets/search/recent"
client <- rtweet_client(client_id = "client id",
client_secret = "client secret",
app = "myapp")# here I have doubts about which is the one that comes here
client_as(client)
a <- tweet_search_recent(query = keywords)
Also adding a couple images to understand the authentication settings.