Reputation: 3527
How can I see if a user is an administrator for the facebook application that I am using to make the API call.
Something like https://graph.facebook.com/{userId}/applications or https://graph.facebook.com/{applicationId}/administrators (these does not work)
Upvotes: 0
Views: 665
Reputation: 1091
You can attack this at two ways:
Try calling /{userId}/accounts and see if the application id is under the results. You need to make sure you get the 'manage_pages' permission from the user for this to work.
Try calling graph.facebook.com/{applicationId}/administrators. In order to do this, you need to use an access token that acts as the application. You can get the access token from the same call in the above solution, /{userId}/accounts. Then check if the user exists in these results.
Upvotes: 1