1

Is there any way to check whether an authenticated user is friend with another given user, not necessarily using the app? For example, knowing if the currently logged user is friend with mark?

It used to be possible querying "/me/friends/[user_id]", but the "/me/friends" endpoint only returns friends who use the app from 2.0 onwards (see https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends).

Any alternative?

gwendall
  • 920
  • 15
  • 22
  • /me/friends is not deprecated. Where did you read that? – WizKid Jan 07 '15 at 02:04
  • Corrected my question. It just returns the user's friends who use the app, not all of her friends. Hence there is no way to know through this endpoint to know if the logged user is friend with another user that does not use the app. – gwendall Jan 07 '15 at 02:40
  • possible duplicate of [Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app](http://stackoverflow.com/questions/23417356/facebook-graph-api-v2-0-me-friends-returns-empty-or-only-friends-who-also-u) – Gabriel Jan 07 '15 at 03:35
  • @gwendall That is by design. And there is no way to know if two people are friends if they have not both granted your app user_friends permission – WizKid Jan 07 '15 at 04:29

1 Answers1

1

There an endpoint for that,

/{user-id-a}/friends/{user-id-b}

but it only works if both parties have given the user_friends permission to your app.

See

Tobi
  • 31,405
  • 8
  • 58
  • 90