gpt4 book ai didi

java - 使用应用程序访问 token 在 Facebook 页面上发布

转载 作者:行者123 更新时间:2023-11-30 11:39:44 25 4
gpt4 key购买 nike

我有一个 Facebook 页面、一个 Facebook 应用程序和该页面的管理员 Facebook 帐户。

现在我想在那个页面上发布一个链接(我不在乎怎么做)。

从现在开始,我通过为我的应用程序获取管理员的用户访问 token 来做到这一点,然后获取页面,为其获取访问 token ,然后通过我的应用程序在页面上与管理员一起发布。

现在 token 已过期,我在文档中阅读了我可以:

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.

所以我得到了应用程序访问 token 。

但现在我不知道如何继续,我如何使用该 token 在页面的墙上发布?

最佳答案

我相信应用程序访问 token 用于代表用户 发布。对于页面,您应该使用页面访问 token 。

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

如上链接所述

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.

关于java - 使用应用程序访问 token 在 Facebook 页面上发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13109198/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com