Schwa97
Schwa97

Reputation: 21

Counting X tweets per keyword

for a research project I need the number of tweets for a keyword for certain days in 2014,2015, and so on. I use the search_tweets function in the rtweet package in RStudio. Here is my code.

``token <- rtweet::create_token(
  consumer_key = "your_key",    # Consumer API Key
  consumer_secret = "your_secret",  # Consumer API Secret
  access_token = "your_access_token",  # Access token
  access_secret = "your_access_secret"  # Access token secret
)`

tweets <- search_tweets(
  "#keyword", 
  since = "2024-09-16", 
  until = "20124-09-19", 
  n = 10000,  # Adjust this depending on the expected number of tweets
  include_rts = FALSE # Exclude retweets if not needed
)`

After that code line I get: Error in search_params(q, type = type, include_rts = include_rts, geocode = geocode, : is.atomic(max_id) && length(max_id) <= 1L is not TRUE

Where is my mistake? Thank you!

I checked my twitter_toke and my rate_limit and tried to only use the keyword and n.

Upvotes: 1

Views: 47

Answers (0)

Related Questions