Is there a way to use since_id and max_id in Twitter's Search API?
I'm trying to get the search results between two specific id's but it seems to ignore the ids, here is a sample o开发者_如何学运维f my query:
http://search.twitter.com/search.json?since_id=58308825907871744&q=%23twitter&rpp=100&max_id=58309448581660674
It just throws back the same set of results if I change the ids. Any ideas?
Unfortunately, the search API doesn't support a max_id
parameter. It features an until
parameter instead, which is specified as a date rather than a status ID. So, you would have to reformat your query something like the following:
http://search.twitter.com/search.json?since_id=58308825907871744&q=%23twitter&rpp=100&until=2011-04-14
Twitter API issue 2052 details Twitter's response to the very issue that you raise.
Note that in v1.1 max_id is supported on the search api.
https://dev.twitter.com/rest/reference/get/search/tweets#api-param-max_id
精彩评论