On 8/12/10 1:59 PM, Rémy B wrote: > Thanks Tom. > > I have already tried these two. My problem is, I always get the "Rate > limit exceeded. Clients may not make more than 150 requests per hour." > error message, even if this is the first time I log in. > I thought it could be possible if the user is logged in using oAuth. > > Let's say I want to get the list of profiles followed by @Twitter: > > <?php > $curl = curl_init(); > curl_setopt($curl,CURLOPT_URL,"http://api.twitter.com/1/friends/ids/ > twitter.xml"); > curl_setopt($curl,CURLOPT_RETURNTRANSFER,true); > $contenu = curl_exec($curl); > $xml = new simpleXMLElement($contenu); > print_r($xml); > foreach ($xml->ids->id as $friend) { > echo $friend."<br>"; > } > ?> > > What am I doing wrong?
Hi Rémy, You are not doing anything wrong. I just tested that code and it works fine. I'd say: wait an hour, and it will work. You could (should) check the HTTP headers - they offer you information about your current rate limit status. I do get this error, but it is not related to the rate limit : Warning: Invalid argument supplied for foreach() in /Users/tom/Sites/test.php on line 9 Tom