I’m trying to request some information from facebook’s FQL, but the request is a little slow.
$friend = "SELECT uid2 FROM friend WHERE uid1 = me() LIMIT 30";
$friendSQL = $facebook->fql($friend);
foreach ($friendSQL as $friends_id){
$uid2 = $friends_id['uid2'];
$query = "SELECT uid,username,name,pic_small FROM user WHERE uid='".$uid2."'";
$friend_info = $facebook->fql($query);
echo "<pre>";
print_r($friend_info);
echo "</pre>";
}
So basically, I’m getting a list of 30 friends and I’m trying to use a foreach loop to get other information from uid2 (which is my friend)
I’ve noticed that the request is slow. Is there another way of getting information of my friends?
Thanks!
Your select statement could look something like:
So you won’t have to use the loop anymore. This is pretty much the same as FQL Multiquery.