Reputation: 66455
Using the old REST API, you could do call https://api.facebook.com/method/pages.isAdmin
to know if a user was the admin of a given page.
How can you do that using the Graph API? I can't find anything about it in the documentation and start to wonder if it's even possible.
Upvotes: 4
Views: 8568
Reputation: 159
From FB docs: GET
/v2.2/{page-id}/roles/{user-id}
Also see How can i get the admins user id of a page in facebook.?.
Upvotes: 0
Reputation: 782
You can try this:
$page=$facebook->api('/[PAGE ID]?fields=access_token');
if (!$page['access_token'])
echo "is not admin";
Upvotes: 0
Reputation: 11
$session_key = $_REQUEST['fb_sig_session_key'];//maybe there is a better way to get this
$access_token = $facebook->getAccessToken();
$is_admin = $facebook->api(array('method'=>'pages.isadmin', 'page_id'=>'YOUR_PAGE_ID', 'session_key'=>$session_key, 'access_token'=>$access_token));
Upvotes: 1
Reputation: 105908
You may be able to view that info in the accounts connection
Upvotes: 3