How to extract tweets within a given time interval


We’re doing an assignment in which we need to extract the updated tweets of last 20 minutes and repeatedly extract this and save it in our database with the created tweet time. We searched on extracting tweets within the given time interval but didn’t find any function that fulfills our requirement.

Kindly help us in this task asap.


Think of the problem differently. Wouldn’t it be wiser to just collect the tweets as they happen, then go back over your data for the time periods you’re interested in? See:


sir, can i fetch location of tweet using twitter4j in java??