I am Alex. I am having an issue with my project. I am trying to fetch all tweets from a specified hashtag.
I need to get tweets from that hashtag on a daily basis, for example from 9AM till 2PM. Within that time I want to display
all tweets in chronological order. I already can fetch tweets and I also got the authentication done correctly. I am working
with PHP. And I am a newbie too with PHP, so please be patient if I may ask something dumb.
I read about max_id and since_id. It seems it’s what I’ve been looking for. I understood it like that:
since_id : Fetch tweets older than the provided since_id
max_id: Fetch tweets “younger” than the id
I would need something like: start with a since id. Fetch like max. 15 tweets. Set since_id to the latest fetch. Would that be correct?
With the API search tool I can provide a since_id BUT and now my issue:
$tweet_ = $connection->get(“https://api.twitter.com/1.1/search/tweets.json?q=%23iPhone&count=15&since_id=12345”);
As you can see, since_id = 12345. How do I set the since_id here correctly? Starting with the earliest tweet in the morning.
Thanks in advance and all the best,