Question get last 7 days tweets with java



I have been watched the video, 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


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.


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();


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