Facebook application ( count friends registered )

随声附和 提交于 2019-12-10 11:38:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!