Search code examples
facebookfacebook-graph-apifacebook-login

How to request pages_show_list permission with Facebook Graph API?


  1. I tried 2 way, one in the Facebook Developer site find permission request with this name, I couldn't find it.
  2. add as a 4th parameter to the Facebook Login Button, it did not help
<FacebookLogin
appId={fbAppId}
autoLoad={true}
fields="name,email,picture,pages_show_list"
onClick={this.componentClicked}
callback={this.responseFacebook}
/>

Do you have any other idea?


Solution

    1. The Facebook API works like this, Development Mode: For development mode you can try to access pages which were associated with the account in which app created. So, that pages associated with that user can be accessible. You can retrieve the pages using following link,

    https://developers.facebook.com/docs/graph-api/reference/user/accounts/

    Live mode: In case of live mode you need to create a video of snapshot using your development mode functionality and get "pages_show_list" permission approved. Then you can access the pages details associated with authenticated users.

    1. For login button you can try like this,
    
    fb:login-button size="large" scope="public_profile,email,pages_show_list,read_insights,manage_pages" onlogin="checkLoginState();"
    

    which gives you token and use that token to get pages associated with user account.