如何使用 Facebook post 到我自己的页面 API

How to post to my own page using the Facebook API

我想 post 更新我拥有的 Facebook 页面,使用 API。

我按照this answer中的说明获得:

  1. 我的用户的 短期访问令牌 ,确保授予 publish_stream 和 manage_pages
  2. 权限
  3. a long-lived access token,令牌调试器实际显示永不过期
  4. 一个 永久页面访问令牌 特定于我的页面,它再次显示为永不过期

我可以使用长期访问令牌 post 到我的墙上,但是那个和特定页面访问令牌都不允许我 post 到我的页面。

如果我尝试使用个人长期访问令牌 post 到我的页面 ID,它 returns OK 和一个实际的 post ID,但是 post 永远不会出现在页面上。

如果我尝试使用页面访问令牌 post /me/feed(应该是页面)或页面 ID,我会得到 #200用户尚未授权应用程序执行此操作,而我显然已经这样做了。

我做错了什么?

我需要提交我的应用程序以供审核吗?当我什至没有 "app" 时,我该怎么做?它没有面向 public 的网站,什么都没有,因为它只是供我个人使用的一个脚本,我想用它来更新我的页面。

根据 docs,您需要 publish_pages 许可才能将 post 作为来自 api v2.3 的页面。之前,除了 manage_pages 之外,它还需要权限 publish_actions。现在他们专门为此目的引入了 publish_pages。 .

A page access token with publish_pages permission can be used to publish new posts on behalf of that page. Posts will appear in the voice of the page.