I'm trying to see if X is a friend of mine using Facebook's Graph API. I was thinking about searching in the /me/friends data but figured that'd be too heavy for my back end.
Appreciate all answers!
I'm trying to see if X is a friend of mine using Facebook's Graph API. I was thinking about searching in the /me/friends data but figured that'd be too heavy for my back end.
Appreciate all answers!
here is FQL query you need to run:
SELECT uid2 FROM friend WHERE uid1 = me() and uid2 = YOUR_FRIEND_ID
here is the URL where you can play with this query:
and this is URL you can call to get that data in JSON format:
obviously you need to replace YOUR_FRIEND_ID
with your friend's id, and you need to get YOUR_ACCESS_TOKEN
- the easiest way would be Graph API Explorer.
so if query returns any data - that means you and YOUR_FRIEND_ID
are friends.