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.
Its simple with Graph API. Steps:
manage_pages
permission from the user (extended permissions).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.
I solved it with some FQL:
FB.api({method: 'fql.multiquery', access_token: <access_token>, queries: { query1: 'select page_id from page_admin where uid = ' + <uid>, query2: 'select page_id, name, page_url from page where page_id in (select page_id from #query1)' } }, function(queries){ var pages = queries[1].fql_result_set; }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With