skip to Main Content

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


  1. 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

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search