The rate_limit_status method does not take a username as a parameter. All
account methods act on the authenticating user's account (or in the case of an
unauthenticated call, the requesting IP address). In order to get each other's
rate limit information, you'll need to have both the user's authenticated as
On Mar 21, 2010, at 8:01 AM, Rushikesh Bhanage wrote:
> Hi, there,
> I am using rest api method in my app, in that, I have two users(i.e
> white-listed user accounts.) and need to get each user's account rate-limit
> request balance, I am using following URL to get request balance.
> ' http://twitter.com/account/rate_limit_status/'.$unm.'.xml '. Here $unm is
> user name passed through ratelimit() function .
> Below is the code logic: (using cURL functions )
> [ function Checklimit()
> for($i=0; $i<2; $i++)
> $usrlimit = $this->ratelimit($this->u[$i]);
> // ratelimit($unm) function will give array containing remaining hits.
> foreach($usrlimit as $key=>$val)
> // $this->u is the array used for fetching users with $i.
> if($key == 'remaining-hits')
> if($val != 0)
> // here will return array element which is having hits.
> return $i;
> // here it doesn't come inside when value of ratelimit of first
> user comes to an end
> // Actually here it goes to second user but does not get it's hits
> from api using ratelimit function. gets same 0 as like first user. It will
> return -1 when no user is having hits.
> return -1;
> Can I have some clue, please.
> Thank You in advance.
> with regards,
> To unsubscribe from this group, send email to
> twitter-development-talk+unsubscribegooglegroups.com or reply to this email
> with the words "REMOVE ME" as the subject.
To unsubscribe from this group, send email to
twitter-development-talk+unsubscribegooglegroups.com or reply to this email
with the words "REMOVE ME" as the subject.