Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 268 Vote(s) - 3.59 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check if multiple user ids are friends with a particular person

#1
I want to know which people in a list of people are friends with this user. Is there a graph api call that can return the subset of ids that is the user's friends? I've tried:

/me/friends/?ids=xxxxx,xxxx

I know I can use a batch call an do something like this:

/me/friends/xxxx
/me/friends/xxxxx

but it would be nice to do it in one call.
Reply

#2
Did you try the mutualfriends option?

me/mutualfriends/xxxxx

[To see links please register here]

Reply

#3
There wasn't an easy way to do this with the graph api, but I was able to do it with an FQL query:

query = '{
"are_friends":"SELECT+uid2+FROM+friend+WHERE+uid1=me()+and+uid2+in('+people_array.join()+')+limit+10",
"friend_meta":"SELECT+uid,first_name,last_name,name,pic_square+FROM+user+where+uid+in(SELECT+uid2+FROM+%23are_friends)"}'

The friend_meta json object in the result will have all the meta info you are looking for. It's one call, and more efficient and cleaner than the batch calls.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through