FaceBook friends.getAppUsers replacement
I am trying to find friends who have already installed the application. After doing much research I found that FaceBook has a way to do this however it is marked as legacy.
Is there a new way to do this via the graph API? Comparing UID's one by one to peop开发者_开发技巧le already in my database would be way to slow.
Facebook FQL queries are still supported and not deprecated, so you could run a query like:
SELECT uid, name FROM user
WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
AND is_app_user = 1
with a url like (url encode this and add your users access token):
https://api.facebook.com/method/fql.query?query=SELECT uid, name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1&access_token=...
However I have found this to be more reliable to do against my own database. If you setup indexing properly and do a IN sql statement it should be really fast as you wouldn't need to do it one by one.
精彩评论