get list of facebook users who are using specific application using FQL

喜你入骨 提交于 2019-11-29 02:18:26
Igy

You can't get a listing of your application's users from the API. If you need this, you should maintain your own database of users and reference that.

You can also check if any particular user is a user of your application by requesting /USER_ID/permissions?fields=installed with your application access token.

You can also check if a user's friends are users of your application by requesting the same field on the friends connection (for example, /USER_ID/friends?fields=installed). In this case, the USER_ID must be a user of your application or you won't be able to access their friends list.

is_app_user on the user table when requesting friends returns this data.

SELECT uid,is_app_user FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

or...

SELECT uid,is_app_user FROM user WHERE is_app_user AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

Which is a bit tighter - only returning those users in-app.

You can't get total number of users who have installed application, but you can get daily, weekly and monthly users with simple query:

SELECT daily_active_users, weekly_active_users, monthly_active_users
  FROM application WHERE app_id = APPLICATION_ID

Note: this will work for any application (not just applications user connected to)

user3461523
SELECT uid FROM user WHERE uid IN ( SELECT uid2 FROM friend 
WHERE uid1 = '549483876' ) AND is_app_user = 1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!