Reputation: 15
I would like to know how to retrieve more than 200 tweets from a twitter page. I know its limited to 200 but read you can retrieve more,Im using php and using this following line of code to get the 200 tweets
$xmldata = 'http://twitter.com/statuses/user_timeline/BBCNews.xml?count=200';
Could someone show me some example code in how to do this?
thanks
Upvotes: 1
Views: 4738
Reputation: 5781
With the twitter API you can only get up to 200 posts per page. You would have to add a &page=x to get the page of tweets (there is a hard limit of 3200 posts)
View the api documentation here
https://dev.twitter.com/docs/api/1/get/statuses/user_timeline
An example of the api call for json would be
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=twitterapi&count=200&page=2
and an example for the xml call would be
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=twitterapi&count=200&page=2
So what i would suggest is if you want to get all 3200 posts is to set up the script in a function to change the page number each time
Upvotes: 4