views:

455

answers:

2

Hi.

I'm using http://apiwiki.twitter.com/Twitter-REST-API-Method:-statuses-user_timeline to read the tweets of the user. When I used basic auth, it worked fine. When I switched to OAuth, the 'page' parameter stopped working.

Like so: http://api.twitter.com/1/statuses/user_timeline/16.xml?count=25&page=2

When I use OAuth to fetch the request, it always returns the first page. I check my code. I even echoed the exact same line, and it was exactly what I needed. The XML is exactly what I want, but when I use OAuth to fetch the XML, it returns the wrong XML.

I use abraham's php library.

So basically. The XML is correct and when entered as URL it returns the correct XML, but when trying to fetch it through OAuth, it returns the wrong XML.

Any clue?

A: 

Hi I just encountered the same problem - when i am using oauth, Twitter seems to be oblivious about GET parameters. I am using php lib form here: http://abrah.am

this doesnt work:

$url = "http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=$name&count=199&page=1";
$content = $to->OAuthRequest($url);

but this does:

$url = "http://api.twitter.com/1/statuses/user_timeline.rss";
$content = $to->OAuthRequest($url, array('screen_name' => $name,'count' => 199, 'page' =>1), 'GET');

izeed
A: 

In the latest version of my library (currently 0.2.0-beta2) it should be called like this:

$to->format = 'xml';
$content = $to->get('statuses/user_timeline/16', array('count' => 25, 'page' => 2));
abraham