Hello,

I find that pushing 99 users into a create_all call will fall over
fairly often with a 502 error.  To get around that, I've backed down
as far as 5...
Although, and I might be just totally & completely wrong about this,
it seems like the response codes don't *completely* line up with the
actual result.  It could be due to the methods I'm using, but it seems
like I could get 502 response codes & still have success.  I haven't
had the time to set up strict testing on this, yet.

I've also found that the 500-user max for lists isn't a hard-set
rule.  I've seen lists that I create go into the 600s... They usually
get corrected later on, though, so I'm not sure what causes that
glitch.

-Jim

On Sep 14, 1:11 pm, Ken <k...@cimas.ch> wrote:
> Finally, after discovering this thread, I added /members/ to 
> thecreate_allendpoint and was able to add 98 members to alist. As
> twitter would say, 'Yay'...
>
> I filed a bug to have the documentation corrected.
>
> Are there still problems adding lots of members, as reported earlier
> in this thread? Since rate-limiting as listed as false in the doc,
> would it be more reliable to just loop over :user/:list_id/members 100
> times? I need to go for "reliable" wherever possible... That way we
> could add up to the 500 members maximum. Recommended ornotreally?
>
> Thanks
> -Ken
>
> On Aug 23, 9:07 pm, Jim Chevalier <jcheval...@gmail.com> wrote:
>
> > Hello,
>
> > Ah-ha! I didnothave /members/ in my POST URL.  Thanks for pointing
> > that out!
> > This actually make it seem 
> > likehttp://dev.twitter.com/doc/post/:user/:list_id/create_all
> > should be changed to state:
> > POSThttp://api.twitter.com/version/:user/:list_id/members/create_all.format
>
> > I also didn't realize I could/should check on $connection->http_code
> > so often.  Thanks for pointing that out as well.
> > It's funny, now that you mention it, I notice the test.php file you
> > included in twitteroauth has that call *everywhere*.
>
> > It seems like I should rewrite my calls to be more like the
> > "twitteroauth_row" function you define in the test.php file so that I
> > can use the $connection->http_code results as error-checking.
> > I'll also have to test if setting "public $retry = TRUE;" in the
> > twitteroauth.php file helps with the 502 response that comes when
> > attempting to push 99 users through thecreate_allcall...
>
> > Thanks for all the help!
> > -Jim
>
> > On Aug 23, 2:44 pm, Abraham Williams <4bra...@gmail.com> wrote:
>
> > > After each TwitterOAuth call you should check $connection->http_code to
> > > check what the result is. 200 on success, 404 onnotfound, etc.
>
> > > My quick findings:
> > > Works: $connection->post('abraham/test3/members/create_all', 
> > > array('user_id'
> > > => $user_ids));
> > > AKA: $connection->post('{$screen_name/{$list}/members/create_all',
> > > array('user_id' => $user_ids));
>
> > > But with the 99 user_ids it would usually return a 502 after adding ~60
> > > users to thelist:http://goo.gl/Zur3
>
> > > Abraham
> > > -------------
> > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > This email is: [ ] shareable [x] ask first [ ] private.
>
> > > On Mon, Aug 23, 2010 at 10:54, Jim Chevalier <jcheval...@gmail.com> wrote:
> > > > hrm, back to square one then...
>
> > > > Abraham - the value of $users is:
>
> > > > 2142731,14125623,15998931,19560364,16559320,17036420,14791918,16908659,5538992,14984281,20188175,14277276,111226850,14327961,20257060,94168006,107679193,54567920,18171797,8886022,16390772,69422500,171538302,818340,168929218,141333525,132534968,14124542,14408989,138293290,2039761,6752072,111896485,175801197,14912789,22907920,15099178,16583906,10870772,94269486,174521748,82002786,15395087,39407092,123734452,17193910,16362662,7762662,21514744,7596972,31563269,23147529,27440127,14337563,1528701,82497472,19251912,15292430,17005679,7192042,14600753,97484744,2023641,92086501,15447441,98735657,16950385,2023191,14411651,23111875,2900,15039436,14479810,16024218,57933102,8453452,18363508,16569530,21034443,17007607,7029452,54997124,47397228,15226527,18193201,22278762,15127641,14204449,60616288,16465359,10371312,15805506,14995035,27727035,19211127,35279958,18023868,9369722,8088412
>
> > > > That's 99 users, in what I believe to be the correct format.
>
> > > > I also ran a test with just 8088412 like this, with the same (blank)
> > > > result:
> > > > $users = 8088412;
> > > > $added = $connection->post("{$user->screen_name}/lists/$listid->id/
> > > >create_all", array('user_id' => $users));
> > > > print_r($added);
>
> > > > Since it seems like the 'create_all' call itself that's the problem, I
> > > > decided to run another test:
> > > > $blahblah = $connection->post("{$user->screen_name}/{$list->id}/
> > > > qhweoi", array('user_id' => $users));
> > > > print_r($blahblah);
>
> > > > This returned nothing, similar to my 'create_all' call.  Since
> > > > 'qhweoi' isnota valid TwitterAPIcall, I'm wondering if either
> > > > twitteroauth just doesn't do the "create_all" call for lists or if my
> > > > implementation of it is broken...
>
> > > > Thanks everyone!
> > > > -Jim
>
> > > > On Aug 23, 12:56 pm, Taylor Singletary <taylorsinglet...@twitter.com>
> > > > wrote:
> > > > > I'm filled with misinformation today.
>
> > > > > But after being set straight by my colleague Matt Harris, I can tell 
> > > > > you
> > > > > that the correct end point for thismethodis in actuality:
>
> > > > >http://api.twitter.com/1/:user/:list_id/members/create_all.format
>
> > > > > Ourlistmethods are obviously confusing in their lack of a
> > > > distinguished,
> > > > > consistent namespace.
>
> > > > > Taylor
>
> > > > > On Mon, Aug 23, 2010 at 9:07 AM, Abraham Williams <4bra...@gmail.com>
> > > > wrote:
> > > > > > Jim,
>
> > > > > > What is your value for $users?
>
> > > > > > Abraham
> > > > > > -------------
> > > > > > Abraham Williams | Hacker Advocate |http://abrah.am
> > > > > > @abraham |http://projects.abrah.am|http://blog.abrah.am
> > > > > > This email is: [ ] shareable [x] ask first [ ] private.
>
> > > > > > On Mon, Aug 23, 2010 at 08:55, Jim Chevalier <jcheval...@gmail.com>
> > > > wrote:
>
> > > > > >> Hello,
>
> > > > > >> Thanks for the clarification!
> > > > > >> It seems I'm still having trouble with the 'create_all' command.
>
> > > > > >> I've updated my code:
> > > > > >> $added = $connection->post("{$user->screen_name}/lists/$listid->id/
> > > > > >>create_all", array('user_id' => $users));
> > > > > >> print_r($added);
>
> > > > > >> This still has no output.
> > > > > >> I noticed you specified "/create_all.json" in your example, so I
> > > > > >> double checked and twitteroauth does default to having the response
> > > > > >> format as json.
> > > > > >> The 'create_all' call isn't just off at the moment, is it?...
>
> > > > > >> Thanks for your help,
> > > > > >> Jim
>
> > > > > >> On Aug 23, 10:51 am, Taylor Singletary 
> > > > > >> <taylorsinglet...@twitter.com>
> > > > > >> wrote:
> > > > > >> > Hi Everyone,
>
> > > > > >> > Think we found a nasty documentation bug around lists here, and
> > > > we'll
> > > > > >> get
> > > > > >> > them fixed as soon as we can.
>
> > > > > >> > I believe the issue here is that we haven't indicated a necessary
> > > > path
> > > > > >> > component.
>
> > > > > >> > TheAPIcall should be to:
>
> > > > > >> > POSThttp://api.twitter.com/1/:user/lists/:list_id/create_all.json
>
> > > > > >> > Sorry about the confusion!
>
> > > > > >> > Taylor
>
> > > > > >> > On Sun, Aug 22, 2010 at 12:41 PM, Jim Chevalier <
> > > > jcheval...@gmail.com
> > > > > >> >wrote:
>
> > > > > >> > > I'm getting no response from 'create_all' (
> > > > > >>http://dev.twitter.com/doc/
> > > > > >> > > post/:user/:list_id/create_all) when using twitteroauth 
> > > > > >> > > (http://
> > > > > >> > > github.com/abraham/twitteroauth).
>
> > > > > >> > > This is the code that I'm using:
> > > > > >> > > $added = $connection->post("{$user->screen_name}/{$list->id}/
> > > > > >> > >create_all", array('user_id' => $users));
> > > > > >> > > print_r($added);
>
> > > > > >> > > Nothing is displayed; no error is provided.
> > > > > >> > > Other POST calls are functioning properly, and the 'members'
> > > > (http://
> > > > > >> > > dev.twitter.com/doc/post/:user/:list_id/members) call isworking
> > > > just
> > > > > >> > > fine.
>
> > > > > >> > > So, you'renotalone Aditya...
> > > > > >> > > -Jim
>
> > > > > >> > > On Aug 18, 9:30 pm, whizcreed <aditya.inter...@gmail.com> 
> > > > > >> > > wrote:
> > > > > >> > > > Hi,
>
> > > > > >> > > > I am using ruby-auth gem to interact with twitterapi.
>
> > > > > >> > > > Unfortunately in situation of an error I am unable to find 
> > > > > >> > > > out
> > > > much
> > > > > >> > > > information on the cause.
>
> > > > > >> > > > I am facing quite a strange problem. Consider following 
> > > > > >> > > > output:
>
> > > > > >> > > > >> r = u.twitter.post("/adityaraj/19567361/members.json", 
> > > > > >> > > > >> "id"
> > > > =>
> > > > > >> > > '35671043')
>
> > > > > >> > > > => {"slug"=>"ruby-on-rails", "name"=>"Ruby-on-rails", 
> > > > > >> > > > "uri"=>"/
> > > > > >> > > > adityaraj/ruby-on-rails", "subscriber_count"=>0,
> > > > "member_count"=>8,
> > > > > >> > > > "mode"=>"public", "id"=>19567361,
> > > > "full_name"=>"@adityaraj/ruby-on-
> > > > > >> > > > rails", "description"=>"", "user"=>{}, "following"=>false}
>
> > > > > >> > > > >> r = u.twitter.post("/adityaraj/19567361/create_all.json",
> > > > > >> "user_id" =>
> > > > > >> > > '35671043')
>
> > > > > >> > > > TwitterAuth::Dispatcher::Error: An error occurred processing
> > > > your
> > > > > >> > > > Twitter request.
> > > > > >> > > >         from
> > > > > >> /home/aditya/work/twitter/vendor/plugins/twitter-auth/lib/
> > > > > >> > > > twitter_auth/dispatcher/shared.rb:35:in `handle_response'
> > > > > >> > > >         from
> > > > > >> /home/aditya/work/twitter/vendor/plugins/twitter-auth/lib/
> > > > > >> > > > twitter_auth/dispatcher/oauth.rb:22:in `request'
> > > > > >> > > >         from
> > > > /var/lib/gems/1.8/gems/oauth-0.4.1/lib/oauth/tokens/
> > > > > >> > > > access_token.rb:44:in `post'
> > > > > >> > > >         from (irb):12
> > > > > >> > > >         from :0
>
> > > > > >> > > > I have tried usingcreate_allmethodwith multiple screen_names
> > > > but
> > > > > >> no
> > > > > >> > > > luck.
>
> > > > > >> > > >APIlink:
> > > >http://dev.twitter.com/doc/post/:user/:list_id/create_all
>
> > > > > >> > > > Can anyone please point out if there is any obvious mistake 
> > > > > >> > > > in
> > > > this
> > > > > >> or
> > > > > >> > > > if you are able to make it work.
>
> > > > > >> > > > Regards,
> > > > > >> > > > Aditya Raj

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en

Reply via email to