编程语言
首页 > 编程语言> > java-twitter4j是否提供在2个日期之间搜索推文的功能

java-twitter4j是否提供在2个日期之间搜索推文的功能

作者:互联网

twitter4j是否提供在2个日期之间搜索推文的功能(例如2011-10-27 05:30:00到2011-10-27 06:30:00)

当前,它似乎具有日期的粒度,而不是小时或分钟.

解决方法:

否,在当前版本中,无法指定日期&在给定范围内进行搜索的时间.

这就是Twitter search API的限制:

Notes about Search Operators

since and until

  • do not support the negation (-) operator.
  • List item should be entered in the format year-month-day or yyyy-mm-dd.
  • are assumed to be from/to 00:00 UTC.
  • cannot be set into the future. If until is in the future you will receive an HTTP 403 error with the message: {"error":"You cannot use an 'until:' date in the future"}. If since is in the future you will receive an HTTP 403 error with the message: {"error":"since_id too recent, poll less frequently"}

标签:twitter4j,java
来源: https://codeday.me/bug/20191102/1988567.html