1

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.

AndresA
  • 11
  • 1

2 Answers2

0

It may be possible using the max_id and since_id parameters. How you would calculate finding an ID within that 4 hour window, I am unsure, but this post might provide some answers: https://stackoverflow.com/a/6416836/5884189

Community
  • 1
  • 1
mmryspace
  • 689
  • 1
  • 9
  • 18
0

I just coded a solution to the same problem in a similar question. Check the answer and change the WINDOW constant to 4 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.

Leopoldo Sanczyk
  • 1,529
  • 1
  • 26
  • 28