Question: Using Facebook graph API, I am trying to retrieve number of mutual friends 2 users have. However, I am getting number of friends of one of them instead.

Here is my code:

```
    <?php

    $mutual_array = json_decode(file_get_contents("https://graph.facebook.com/".$fb_id."/mutualfriends/".$other_fb_id."?".$access_token), true);

    $mutual_friends = $mutual_array['data'];
    $mutual_number = count($mutual_friends);

    ?>

```

$mutual\_number gives the number of facebook friends $other\_fb\_id user has. And when I try to print\_r $mutual\_friends it gives all the friends the user has.

Anyone know what's going on here? Thanks.

Answer: 
This is a facebook api bug. Even though the information is symetrical, to get the number of mutual friends, you have to use the access token of the current user (user a), not of the other user you are checking with.
You forgot the `access_token=` param:

```
$mutual_array = json_decode(file_get_contents("https://graph.facebook.com/".$other_fb_id."/mutualfriends/".$fb_id."?access_token=".$access_token), true);

```