tirithen
tirithen

Reputation: 3527

Open Graph API: Find out if user is application administrator

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

Answers (1)

JayNCoke
JayNCoke

Reputation: 1091

You can attack this at two ways:

  1. 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.

  2. 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

Related Questions