Twitter搜索api直到参数

时间:2015-10-16 22:06:51

标签: javascript ajax api twitter

序言:

  • 今天是2015年10月17日
  • 日期until的参数From 2015-10-08 to 2015-10-17工作得很好
  • 日期小于until的参数2015-10-08根本不起作用

我做错了什么?如何在日期范围内(超过10天)收到推文?

这是我的代码:

var params = {
    count: 3, 
    until: "2015-10-08", 
    from: "[any_random_user]"
};

$.ajax({
   url: twitterApi + "search/tweets.json",
   type: "GET",
   dataType: "jsonp",
   data: params ,
   success: function (response) {
      console.log(response);
   }
});

PS https://dev.twitter.com/rest/public/search

PPS我使用的是1.1 API版本。

1 个答案:

答案 0 :(得分:1)

这是不可能的。如您链接到的页面所述,搜索服务仅限API用户使用。

作为per the documentation

  

请注意,搜索索引有7天的限制。换句话说,对于超过一周的日期,不会发现任何推文。

如果您只对该用户的推文感兴趣,可以下载个人用户的推文(最多3,200条推文)。