开发者

Twitter: Number of tweets OR get more tweets

I would like to know how can I get all tweets from a开发者_StackOverflow中文版 certain hash tag?

I am currently using the following code:

xhr.open("GET","http://search.twitter.com/search.json?q=%23PrayForJapan");

This only returns me 15 tweets. Does anyone know how to make it return more?

Also, I have got a code to get me the tweets of a certain screen name, this only returns 20 tweets, how can i ask the following 20 tweets?

The code i used for that is:

xhr.open("GET","http://api.twitter.com/1/statuses/user_timeline.json?screen_name=Eminem");

I'm using titanium to create this, but I don't think that is an issue?

Thanks!


You can usually add count=x as parameter to the query string to get up to x tweets (for the search api it seems to be rpp). Query string parameters are added to the base url via ? and each individual parameter is then separated by & as in http://api?user=1&count=4

Most of the time, it is better though to remember the last tweets and then add ?since_id=x as this way you only get tweets you did not see before.

Have a look at the api documentation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜