How to get if a user is admin of a page (isAdmin) using the Facebook Graph API?

后端 未结 5 1832
攒了一身酷
攒了一身酷 2021-01-06 10:37

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

5条回答
  •  天涯浪人
    2021-01-06 10:56

    You can try this:

    $page=$facebook->api('/[PAGE ID]?fields=access_token');
    if (!$page['access_token'])
        echo "is not admin";
    

提交回复
热议问题