我想要多個朋友。 我想標記約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