Getting multiple users

2 views
Skip to first unread message

Mauri

unread,
Nov 20, 2009, 4:36:07 PM11/20/09
to Twitter Development Talk
Is there a way to get multiple user's information with one call? My
page is running slow and it looks like it would take a second or two
less if I could do this with one call.

Basically, the page shows a list of your followers, their name and
profile pictures by loading the user's followers list and getting each
follower's information

Here is part of the code

for($b=0; $b<count($followers); $b++) {
$moreinfo = $connection->get('users/show', array('user_id' =>
$followers[$b]));
$moreinfo = json_decode($moreinfo, true);
...
}


Thanks in advance

Abraham Williams

unread,
Nov 23, 2009, 10:33:47 AM11/23/09
to twitter-deve...@googlegroups.com
In short. No. 

You can make parallel cURL request though. it would then only take as long as the longest request.

Here is the php docs on parallel cURL calls: http://www.php.net/manual/en/function.curl-multi-init.php

Abraham
--
Abraham Williams | Community Evangelist | http://web608.org
Hacker | http://abrah.am | http://twitter.com/abraham
Project | Awesome Lists | http://twitterli.st
This email is: [ ] blogable [x] ask first [ ] private.
Sent from Madison, WI, United States
Reply all
Reply to author
Forward
0 new messages