如何使用Facebook API发布到我自己的页面 [英] How to post to my own page using the Facebook API

查看:390
本文介绍了如何使用Facebook API发布到我自己的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我按照这个答案获得:


  1. a 短期访问令牌对于我的用户,请确保授予publish_stream和manage_pages

  2. a 长期存取的访问令牌的权限,令牌调试器实际上显示为从不

  3. a 永久页面访问令牌特定于我的页面,再次显示为永不过期

我可以使用长命的访问令牌发布到我的墙上,但是这两个都不是特定的页面访问令牌允许我发布到我的页面。



如果我尝试使用个人长期访问令牌发布到我的页面ID,它将返回确定和实际的职位ID,但该帖子不会出现在



如果我尝试使用页面访问令牌发布到 / me / feed (应该



我做错了什么?



我需要提交我的应用程序进行审核吗?当我甚至没有应用程序时,该怎么做?它没有公开的网站,没有什么,因为它只是一个单独的脚本供我自己的个人使用,我想用来更新我的页面。

解决方案

根据文档,您将需要 publish_pages 从api v2.3发布为页面的权限。之前,除 manage_pages 之外,还需要许可 publish_actions 。现在他们为此目的引入了 publish_pages 。 。


具有 publish_pages 的页面访问令牌可用于
代表该页面发布新的帖子。帖子将出现在页面
的声音中。



I would like to post updates to a Facebook Page I own, using the API.

I followed the instructions in this answer to obtain:

  1. a short-lived access token for my user, making sure to grant permissions for publish_stream and manage_pages
  2. a long-lived access token, which the token debugger actually shows as never expiring
  3. a Permanent Page Access Token specific for my page, which again is shown as never expiring

I can use the long-lived access token to post to my wall, but neither that nor the specific page access token allow me to post to my page.

If I try to use the personal long-lived access token to post to my Page ID, it returns OK and an actual post ID, but the post never appears on the page.

If I try to use the page access token to post either to /me/feed (which should be the page) or to the page ID, I get #200 The user hasn't authorized the application to perform this action which I clearly did.

What am I doing wrong?

Do I need to submit my app for review? How can I do so, when I don't even have an "app"? It has no public facing website, nothing, because it's only a single script for my own personal use, which I'd like to use to update my page.

解决方案

according to the docs you will need publish_pages permission to post as page from api v2.3 . Prior, it needed permission publish_actions in addition to manage_pages. Now they have introduced publish_pages specifically for that purpose. .

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.

这篇关于如何使用Facebook API发布到我自己的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆