Reputation: 155
Is there a way to add an administrator to a Facebook application from the API?
We have an app that we have full code access to, but are not able to access the admin panel in Facebook. The client unfortunately doesn't have access and has come to us for help.
I haven't yet found anything in the API that would allow us to add an app administrator and was wondering if anyone knew how.
Upvotes: 0
Views: 116
Reputation: 43816
Yes, you can post to the Application's 'roles' connection via the API, documentation here: https://developers.facebook.com/docs/graph-api/reference/app/roles#publish
It's a HTTP POST request to /<App id>/roles?user=<USER ID>&role=<ROLE>
using a user access token from one of the existing admins
Possible roles are 'administrators', 'developers', 'testers', or 'insights users'
You'll need an existing admin of the app to authorise it, and you'll need the app access token to get a list of who those existing admins are
Upvotes: 1