Я получил решение, проверив запросы FQL.
//$target_id=id of user to check relationship
//$source_id=logged in user
$query="SELECT uid, name, work FROM user WHERE uid IN
(SELECT uid2 FROM friend WHERE uid1 = $target_id AND uid2=$source_id)
ORDER BY name";
$user_info=$this->facebook->api(array('method'=>'fql.query',
'query'=>$query));
if(!empty($user_info))
{
$degree='friend';
}
else {
$query="SELECT uid, name, work FROM user WHERE uid IN
(SELECT uid2 FROM friend WHERE uid1 IN (SELECT uid2 FROM friend WHERE uid1 = $target_id) AND uid2=$source_id)
ORDER BY name";
$user_info=$this->facebook->api(array('method'=>'fql.query',
'query'=>$query));
// we can check friend-of-friend for app user friends
if(!empty($user_info)) {
$degree='friend-of-friend';
}
else{
$degree='none';
}
}
Пожалуйста, ответьте, если кто-нибудь знает какой-либо простой метод.