how to collect Twitter data from past year

Hello friends, I have the code below I used to collect Twitter data from last year but it collected 1 tweet from 2018, 3 tweets from 2016 and 96 tweets from 2015. Can anyone help me with how to fix the error?
NaijaDecide <- get_timelines("NigeriaDecide",
n = 100,
language = 'en',
since = '2019-01-01',
until = '2019-04-30')

This sounds like a job for the rtweet package.

This should give you an example

library(rtweet)

nigeria_tweets <- search_tweets(
  "#Nigeria", n=100, include_rts = FALSE)

Created on 2019-11-02 by the reprex package (v0.3.0)

You can find a lot more information on this package at

Hi, thanks for the reply. I tried the rtweet package but maybe I am missing something.
In exact terms, I want to collect tweets about #NigeriaDecides2019 from November 1, 2018 to March 30, 2019. Do you mind helping me with a code to run please?

Please read the documentation carefully.
Note that

"At the time of searching, the search API index includes between only 6-9 days of Tweets."

A search on 2019-11-09 gathers 13 tweets with this hashtag from 2019-10-31 to 2019-11-08.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.