简体   繁体   English

Spring Social Twitter REST API和“截止”日期

[英]Spring Social Twitter REST API and “until” date

I am trying to retrieve tweets for a hashtag using Spring Social Twitter APIs. 我正在尝试使用Spring Social Twitter API检索主题标签的推文。

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). 我什至尝试使用https://dev.twitter.com/rest/tools/console直接调用REST API(例如https://api.twitter.com/1.1/search/tweets.json?q = <>&lang =烯&计数= 10&直到= 2016年12月10日)。

However without the "until" date API works fine both through Spring and REST Tool. 但是,没有“直到”日期的API可以通过Spring和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 ). Twitter Search API仅在过去7天内针对推文进行搜索(如文档中所述 )。 Thus, if your until field is before 7 days from the query submission, no results will return. 因此,如果您的until字段在提交查询后的7天之前,则不会返回任何结果。

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.). 检索发布超过7天的推文的唯一方法是订购Twitter服务的付费订阅,该服务可以搜索Twitter的历史数据( 例如GnipNuvi等)。 There are currently no free options that achieve this objective. 当前没有免费选项可以实现此目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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