[英]Does twitter4j provide the capability to search tweets between 2 dates
twitter4j是否提供在2個日期之間搜索推文的功能(例如2011-10-27 05:30:00至2011-10-27 06:30:00)
目前它似乎具有日期的粒度而不是小時或分鍾。
不,在當前版本中,無法在給定范圍內指定搜索的日期和時間。
這就是Twitter搜索API的局限性:
關於搜索運算符的注釋
從那以后
- 不支持否定( - )運算符。
- 列表項應以年 - 月 - 日或yyyy-mm-dd格式輸入。
- 假設是從00:00 UTC到00:00。
- 不能成為未來。 如果將來您將收到HTTP 403錯誤消息:
{"error":"You cannot use an 'until:' date in the future"}
。 如果將來,您將收到HTTP 403錯誤消息:{"error":"since_id too recent, poll less frequently"}
Query query=new Query("#sachin");
//Returns tweets with since the given date. Date should be formatted as YYYY-MM-DD
query.setSince("2012-02-20");
query.since()只能回溯幾天,一周左右,而不是更多。 我認為唯一的選擇是使用屏幕刮刀。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.