Post on Facebook Page with Application Access Token

自古美人都是妖i 提交于 2020-01-05 03:11:26

问题


I have a facebook page, a facebook app and an administrator facebook account of that page.

Now i want to publish a link on that page (i don't care how).

Since now i did that by getting a user access token of the admin for my app, then get the page, get a access token for that and then post with the admin on the page via my app.

Now the token expired and i read in the documentation that i can:

For example, if a user granted your app publish_stream permissions, your app can use an app access token to publish a status update on their behalf.

So i got the application access token.

But now i don't know how to go on, how can i publish on the page's wall with that token ?


回答1:


I believe the application access token is for publishing on behalf of users. For pages, you should be using the page access token.

https://developers.facebook.com/docs/reference/api/page/

As described in the link above

To perform the following operations as a Page, and not the current user, you must use the Page's access token, not the user access token commonly used for reading Graph API objects. This access token can be retrieved by issuing an HTTP GET to /USER_ID/accounts with the manage_pages permission. This will return a list of Pages (including application profile Pages) to which the user has administrative access, along with access_tokens for those Pages. Alternatively, you can get a page access token for a single, specific, page by issuing an HTTP GET to /PAGE_ID?fields=access_token with the manage_pages permission, as described above. Publishing to a Page also requires the publish_stream permission, unless otherwise noted.




回答2:


After more research i think there is no way to publish on pages with only a app token.

It is still possible to post on the wall of the users that authorized the app, but not on their pages ...



来源:https://stackoverflow.com/questions/13109198/post-on-facebook-page-with-application-access-token

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!