Search code examples
facebookfacebook-graph-apifacebook-graph-api-v2.0

Facebook graph API V2.0 - how to get group context? (memebers who are my friends)


Facebook major API change sucks but we have to deal with it. The page endpoint got a new "context" field which returns the number of friends who like this page, and the identity of the friends who also installed my app.

For example:

/v2.0/579302565453830?pretty=1&fields=context.fields(mutual_friends.limit(1000))

This is possible according to the new documentation: https://developers.facebook.com/docs/facebook-login/social-context/v2.0

I can also get the members of a group, for instance:

/v2.0/573611446041812/members

How can I mix it and get only the members (or at least number of members) that are my friends? /me/friends returns only friends that use my app so this is not an option.


Solution

  • As /v2.0/me/friends returns only app-using friends, its only possible to surface to a user the subset of a group's members, who are friends of the user, where those friends also use the app.

    There is currently no friends_who_are_members (or similar) context edge on the Group node.