Search code examples
facebookmutual-friendship

Facebook API - Mutual Friends


Is there a way to retrieve a list of mutual friends between /me/ and a certain {facebook id}

I thought this was possible with 1.0, but am wondering if it can still be done with 2.0


Solution

  • Yes, this is possible. Graph API v2.0 introduced a new endpoint

    GET /{user-id}.context/mutual_friends
    

    which is described at https://developers.facebook.com/docs/graph-api/reference/v2.1/user.context/mutual_friends

    There's a summary.total_count field in the result of the call which contains the number of mutual friends.