I'm using the Twitter URL: http://search.twitter.com/search.json?q=%23test in order to return a JSON list of tweets with the hash tag #Test.

It returns 15 results and says page 1. How do I load the next page of 15 tweets?

*I tried adding &page=2 to the search URL, but no luck.

有帮助吗?

解决方案

The JSON response of the URI you posted includes the query parameters to use to get the next page. It's in the "next_page" element. Currently, the value is "?page=2&max_id=80076124637499392&q=%23test". So, the complete URI for the second page is http://search.twitter.com/search.json?page=2&max_id=80076124637499392&q=%23test

The Twitter search API documentation unfortunately does not describe how to use this parameter, though it is briefly described in the Twitter API Wiki at http://apiwiki.twitter.com/w/page/22554664/Return-Values.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top