How to get the access token to post on behalf of a facebook page via a custom application?

后端 未结 1 1066
鱼传尺愫
鱼传尺愫 2021-01-17 00:01

I found the below solution immensely useful, So I thought I should share it!

相关标签:
1条回答
  • 2021-01-17 00:41

    To post to a facebook page via a facebook application, you need to get the access token (with the required permissions) of the facebook page meant for the application use. To get this, login to your facebook account and goto the Graph API Explorer. In the explorer:

    1. Submit this url: https://graph.facebook.com/me/accounts' (in the url field, inside the app. page.)

    2. Select the application on behalf of which you want to to do things(post,like, etc.).

    3. Click Get Access Token (if you don't have one) to get it.

    4. Select the permissions to grant to this app. : publish_stream, offline_access & manage_pages ( for posting to page wall post).

    5. You will see a list of your entities (or graph objects) on facebook, such as an fb page or an app along with their access tokens. Also, for a page you will find, the permissions the querying application has for the page.

    6. Now the querying application can operate on behalf of the page (or any object) by using the object's id and their access token.

    0 讨论(0)
提交回复
热议问题