私は私とほとんどの相互の友人との友人を見つけようとしています。
public function topThreeMutualFriends() {
$count;
$query='select uid1 from friend where uid1 in (select uid2 from friend where uid1=me()) and uid2 in (Select uid2 from friend where uid1=me()) and uid1!=uid2';
$result = $this->api(array('query' => $query , 'method' => 'fql.query'));
if(!$result)
throw new exception("No Mutual Friends");
else{
foreach ($result as $uid)
$count[$uid['uid1']]++;
arsort($count, SORT_NUMERIC);
$i=0;
foreach($count as $key=>$uid){
$topthree[$i++]=$key;
if($i==3)break;
}
return array($topthree,$count);}
}
上記のコードでは、「リソースの制限のため、このAPI呼び出しを完了できませんでした」という例外が発生します。すべての権限を付与しようとしましたが、クエリはfqlテスターで正常に機能します。考えられる理由は何ですか?