Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test if user has application installed with Graph API

What is the most current method to determine if a Facebook User has installed an application? I see that there is an "installed" field on the "permissions" connection of a user object, but that requires an access_token to test. What happened to isAppUser and why does this URL say the following:

Please use the Graph API User object and GET /[UID]?field=installed to check if a user is has TOSed that app.

The referenced /[UID]?field=installed does nothing.

like image 915
typeoneerror Avatar asked Dec 28 '22 14:12

typeoneerror


1 Answers

This is working for me when asking for 'fields' - the docs appear to be referencing 'field' which I think is incorrect, I'll get it updated if that's the case:

e.g.

GET https://graph.facebook.com/me?fields=installed&access_token=<SNIPPED TOKEN>

Returns:

{
   "installed": true,
   "id": "<SNIPPED ID>"
}

A call to /me/permissions is probably what you want in most cases as this will also show the extended permissions granted to your app

like image 150
Igy Avatar answered Dec 30 '22 04:12

Igy