简体   繁体   中英

Spring Social Twitter REST API and “until” date

I am trying to retrieve tweets for a hashtag using Spring Social Twitter APIs.

When I pass the date in required format in "until" field, I am not able to retrieve the tweets. I even tried directly invoking the REST API using https://dev.twitter.com/rest/tools/console (example https://api.twitter.com/1.1/search/tweets.json ? q=<>&lang=en&count=10&until=2016-12-10).

However without the "until" date API works fine both through Spring and REST Tool.

Appreciate if anyone could help me understand this behavior.

The Twitter Search API only searches against tweets in the last 7 days (as mentioned in the documentation ). Thus, if your until field is before 7 days from the query submission, no results will return.

The only way to retrieve tweets posted longer than 7 days is to order a paid subscription to a Twitter service that has the ability to search against Twitter's historic data (ie Gnip , Nuvi , etc.). There are currently no free options that achieve this objective.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM