开发者

How to load Additional Pages for Twitter Hashtag Search using JSON

开发者 https://www.devze.com 2023-03-12 04:00 出处:网络
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.

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开发者_如何学C 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消