I have a small program that fetch tweets and displays them in google maps, it works perfect but I would like to know if there is a way to put a timeframe, for instance lets say I would like to fetch the tweets written in the last 4 hours, is it possible? Thanks for your help!
The program is written in PHP and javaScript.
2
Answers
It may be possible using the
max_id
andsince_id
parameters. How you would calculate finding anID
within that 4 hour window, I am unsure, but this post might provide some answers: https://stackoverflow.com/a/6416836/5884189I just coded a solution to the same problem in a similar question. Check the answer and change the
WINDOW
constant to4
to get the tweets in the last four hours. Good luck!PS: I think the mods don’t want you to repeat similar answers in 2 questions so I let you the link, but I could edit the answer later and paste the code here if I’m wrong.