Search code examples
facebook-graph-apifacebook-appsfacebook-pagefacebook-access-tokenfacebook-authentication

How to handle pages of user with fb user access token


I am creating an application which connects to a FB app and allows users to login via FB to my application. When login to application using oauth, it will provide a User Access Token. Can i use that token to get list of pages and page access tokens that created by user using User Access Token?

The ultimate target is this project is accessing/managing pages that created by logged users via our own application.

Please tell me possibility of this thing and let me know if you have any other suggestions.

Thank you.

Regards, Sahan.


Solution

  • Sure, you simply need the right permissions in your login flow. A good overview is listed here: https://developers.facebook.com/docs/pages/access-tokens

    You should have a look at the page access token, because they are required as soon as you work with pages.

    BTW, afaik it is not possible to create pages with a Facebook app and according to the Graph API reference only updating page information is possible.