问题
Using JS SDK for facebook, is there a way to count number of friends (of currently logged in user) that are also using my application ?? I found this query online
SELECT uid FROM user
WHERE user.uid IN (SELECT uid2 FROM friend WHERE uid1 = ?)
AND is_app_user = 1
But I don't understand it, and I don't know what to put instead of '?'
Thanks in advance!
回答1:
It retrieves uid of friends of the user, specified by ?, that are also users of your application.
So instead of ? just put the current user's id.
Detailed information about: user and friend fql tables
回答2:
In case you want to use the uid of the currently logged on user, just make use of me()
来源:https://stackoverflow.com/questions/7060238/facebook-application-count-friends-registered