Using multiple accounts to get around rate limiting is not really in the spirit of the Twitter API and I recommend you banish the idea from your mind.
Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Tue, Mar 23, 2010 at 7:03 AM, natefanaro <[email protected]> wrote: > There is no way that Twitter's api is going to let you swap between > two users (ie: here are two usernames that can auth, swap to the other > when one runs out of hits) > > You will have to check the authenticating user's rate limit before > each request. When that account hits 0, authenticate with the second > user, check it's rate limit, if it's greater than 0 continue with the > request. > > If you code your app this way your request won't be interrupted. But > instead of going through hoops like this could you explain what you're > doing that requires over 20,000 requests per hour? I can't speak for > Twitter but I would guess that using multiple accounts to get around > rate limits is frowned upon. There may be an easier way to achieve > what you're doing (streaming/higher access levels/etc) > > On Mar 23, 7:02 am, Rushikesh Bhanage <[email protected]> wrote: > > Hi there, > > Yes I got your point Sir and that's the problem automatic switching > of > > user does not take place. Yes authentication is essential, but can I do > that > > using rate_limit_status method(passing user name and password to method) > for > > these two users or OAuth is the option, but it's not possible in this > > case(have already implemented OAuth in app), because this is going to be > > automatically. Above two user names will be white listed A/C's(that I am > > going to do as this problem will get solved on current requests). I read > > Twitter api documentation, in that I got clue to pass unm and pwd using > > cURL ( have used it) like this-> > > > > curl -u user:passwordhttp:// > api.twitter.com/1/account/rate_limit_status.xml< > http://twitter.com/account/rate_limit_status.xml> > > is this possible? > > > > Thank you in advance sir. > > > > -- Rishi. > > > > On Mon, Mar 22, 2010 at 10:32 PM, Mark McBride <[email protected]> > wrote: > > > Authenticate as the second user. > > > > > ---Mark > > > > >http://twitter.com/mccv > > > > > On Sun, Mar 21, 2010 at 11:55 PM, Rushikesh Bhanage < > > > [email protected]> wrote: > > > > >> Hi, > > >> (Note: In my app, single white listed useraccount's requests are > not > > >> sufficient to complete particular task, so i need to switch from one > account > > >> to another without breaking operation, if previous A/C's hits got > over. ) > > >> In my case both the users are authenticated. Now problem is that > how to > > >> switch from one user to another, when next user comes, he should come > up > > >> with it's hits for the operations, when previous user's hits got over. > In > > >> such situation how can i use rate_limit_status method. > > > > >> Thank you in advance, > > > > >> rishibhanage > > > > >> On Mon, Mar 22, 2010 at 1:19 AM, Chris Thomson <[email protected] > >wrote: > > > > >>> 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 themselves. > > > > >>> -- > > >>> Chris Thomson > > > > >>> 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< > http://twitter.com/account/rate_limit_status/%27.$unm.%27.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, > > >>> rishibhanage. > > > > >>> 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. > > > > >> 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. > > 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.
