facebookfacebook-graph-apifacebook-page

Facebook: get list of pages that a user is admin of


I'm using the graph api.

I have a logged in user, and want to get back a list of page ids of all the pages that the user is an admin of.

Is there a way of doing this? The docs are pretty bad - and circular.


Solution

  • Its simple with Graph API. Steps:

    1. Get the manage_pages permission from the user (extended permissions).
    2. Call the Graph API - https://graph.facebook.com/me/accounts

    You can test this procedure in the graph explorer -> Just click on 'Get Access Token' button-> under 'Extended permission' check 'manage_pages' & submit it. It will give you the admin-page-details JSON.