Question get last 7 days tweets with java


#1

Hi

I have been watched the video https://www.youtube.com/watch?v=Il4wJxRzvaU, in this video with java can extract with twitter4j the last 20 text message using getText().

Is there any way to extract the last 7 days in java with twitter4j?

Thank you


#2

Yes, you should check the Twitter4J documentation for information about the search API, or the parameters for the home timeline. The reason that there are only 20 statuses returned in the video is that the statuses/home_timeline endpoint defaults to a count of 20.


#3

For 7 days tweets you could also look at working with the java.util Date class when looping through your status results

Date tweetCreated = str.getCreatedAt();


#4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.