Delay and Inconsistent results using Twitter searc

2019-04-07 21:42发布

We've noticed what seems to be a delay and/or inconsistent results using the Twitter Search API when specifying a sinceid in the param clause. For example:

http://search.twitter.com/search?ors=%23b4esummit+@b4esummit+b4esummit&q=&result_type=recent&rpp=100&show_user=true&since_id=

Will give the most recent Tweets, but:

http://search.twitter.com/search?ors=%23b4esummit+@b4esummit+b4esummit&q=&result_type=recent&rpp=100&show_user=true&since_id= 12642940173

will often not give tweets that are after that ID for several hours (even though they're visible in the first query)...

anyone have similar problems?

标签: twitter
1条回答
劫难
2楼-- · 2019-04-07 22:37

First off, those are not Twitter search API URLs. You should be querying the API like this:

http://search.twitter.com/search.json?q=%23b4esummit%20OR%20@b4esummit%20OR%20b4esummit&result_type=recent&rpp=100&show_user=true

Second, since_id cuts off from the bottom of the list. You can see the behavior illustrated in this documentation: https://dev.twitter.com/docs/working-with-timelines

For an example, at the time of this writing, the above URL returns 31 entries. Picking the ID of a Tweet in the middle of that list, I constructed:

http://search.twitter.com/search.json?q=%23b4esummit%20OR%20@b4esummit%20OR%20b4esummit&result_type=recent&rpp=100&show_user=true&since_id=178065448397574144

Which only returns 12 entries, which match the top 12 entries of the first URL.

查看更多
登录 后发表回答