我使用此代码获取有关朋友的信息
<?php
$fql = "SELECT uid, name, pic_square FROM user WHERE uid = me() OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ";
$fUIDS = $facebook->api(array(
'method' => 'fql.query',
'query' =>$fql,
));
print_r($response);
?>
现在我需要以这种方式显示结果
echo '<img src="'.$response['pic_square'].'"/>';
但它没有用所以我这样做了
$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=count($fPics);
echo 'Total '.$i.' entries found !<br/>'; // this lines shows 10 as expected :)
for ($x=0;$x<$i;$x++)
echo '<img src="'.$fPIcs[$x].'"/>';
现在显示Array
10次,有什么问题吗?