当前我正在执行此 FQL 以获取用户信息
请帮助我将所有查询合并为一个 [我想通过编写单个 FQL 来获取 4 个数组中的所有信息]!
$pics=array();
$ids=array();
$names=array();
$sexs=array();
$i=0;
$fql = "SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ";
$fUIDS = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
foreach($fUIDS as $data)
{
$ids[$i]=$data['uid'];
$i++;
}
?>
<?php
$fql = "SELECT name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ";
$fNames = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
$i=0;
foreach($fNames as $data)
{
$names[$i]=$data['name'];
$i++;
}
$fql = "SELECT pic_square FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ";
$fPics = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
$i=0;
foreach($fPics as $data)
{
$pics[$i]=$data['pic_square'];
$i++;
}
$fql = "SELECT sex FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())";
$fSexs = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
$i=0;
foreach($fSexs as $data)
{
$sexs[$i]=$data['sex'];
$i++;
}
?>