我想要多个朋友。 我想标记约10位朋友顶部10 如果有任何机构知道? 新这里这就是为什么。 这里是代码:使用fql标记照片中的前10位朋友
$user = $facebook->getUser();
'$user_profile = $facebook->api('/me');
$coded = $_REQUEST['code'];
$access_token = $facebook->getAccessToken();
$name = "".$user_profile['name']."";
$fbid = "".$user_profile['id']."";
$fql = 'https://graph.facebook.com/fql?q=SELECT+uid2+FROM+friend+WHERE+uid1='.$fbid.'+ORDER+BY+rand()+LIMIT+1&access_token='.$access_token.'';
$fqlresult = file_get_contents($fql);
$f = json_decode($fqlresult, true);
$friends = $f['data']['0']['uid2'];
$fql2 = 'https://graph.facebook.com/'.$friends.'';
$fqlresult2 = file_get_contents($fql2);
$f2 = json_decode($fqlresult2, true);
$friend = $f2['name'];
$file='img/'.$fbid.'.jpg'; //Example image file
$data = array(array('tag_uid' => $friends, 'x' => rand() % 100, 'y' => rand() % 100));
$data = json_encode($data);
//, 'tags' => $data,
你得到什么错误? – DMCS 2012-01-14 15:55:02
其唯一标记一个朋友... – 2012-01-15 04:18:22