facebookfacebook-graph-apifacebook-graph-api-v2.0facebook-graph-api-v2.1

Determining if two app using users have any mutual friends in Graph API 2.0/2.1?


I want to determine if two users (both using my app) have any mutual friends in common. The names/data of the users are irrelevant, the number of the mutual friends is irrelevant. I just need if two people have any friends on Facebook in common or not. The mutual friends may not be using the app, but the two ends ARE using my app. These were pretty easy in Graph API 1.0, but I'm wondering if what I'm trying to achieve is possible by any means in Graph API 2.0 or 2.1?


Solution

  • Use the mutual_friends API. How to use it is explained at https://developers.facebook.com/docs/graph-api/reference/v2.1/user.context/mutual_friends