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

13,507

Solution 1

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.

Solution 2

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.

Solution 3

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)

Share:
13,507
Hunt
Author by

Hunt

Updated on June 04, 2022

Comments

  • Hunt
    Hunt almost 2 years

    I am trying to fetch following case using FQL

    If few users have authorized "Application A" then is it possible to know that currently how many users are using that "Application A" ( users those are not friends of each other)

    So far i tried following FQL , but following query gives only information of those users who are friends of each other and using the same application , but what about other users who are not friends ?

    SELECT uid, name, pic_square 
    FROM user  
    WHERE is_app_user=1 AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())
    
  • Valerio
    Valerio about 11 years
    dude you just saved me the research in all the facebook fql apis :)