简体   繁体   中英

Facebook application ( count friends registered )

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!

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

In case you want to use the uid of the currently logged on user, just make use of me()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM