哪些Facebook权限允许发布到页面墙(不是配置文件墙)? [英] Which Facebook permissions allow for posting to a page wall (not profile wall)?

查看:102
本文介绍了哪些Facebook权限允许发布到页面墙(不是配置文件墙)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个将数据发布到Facebook页面墙壁的项目。我已经设置了一个Facebook应用程序,并且当尝试发布到他们的页面的墙上时,正在请求用户的以下权限:

I am working on a project to post data to the walls of Facebook pages. I have set up a Facebook app and currently requesting the following permissions from user when attempting to post to their page's wall:


  • publish_stream

  • offline_access

  • manage_pages

  • publish_stream
  • offline_access
  • manage_pages

代码当前已成功发布到PROFILE的墙壁,但是当尝试发布到PAGE的墙,返回以下错误:

The code currently posts to a PROFILE's wall successfully, but when trying to post to a PAGE's wall, the following error is returned:


Facebook错误:(#200)用户尚未授权应用程序执行此操作

Facebook error: (#200) The user hasn't authorized the application to perform this action.

再次,我要求的权限显然足以发布到个人资料的墙壁,而不是页面的墙壁。我错过了哪些权限发布在页面的墙上?感谢您提前获得任何帮助。

Again, I am requesting permissions which apparently are sufficient for posting to a profile's wall, but not to a page's wall. Which permission(s) am I missing for posting to a page's wall? Thank you in advance for any help.

推荐答案

这是您的工作。首先,阅读有关扩展权限的文档。请注意,manage_pages说:

here's what you do. First, read the documentation on extended permissions. Notice that 'manage_pages' says:


使您的应用程序为用户管理的页面检索access_tokens。可以使用Graph API中的accounts连接来查询访问令牌。此权限仅与Graph API兼容。

Enables your application to retrieve access_tokens for pages the user administrates. The access tokens can be queried using the "accounts" connection in the Graph API. This permission is only compatible with the Graph API.

这意味着您必须根据

https://graph.facebook.com/$USERID/accounts?access_token=$USER_ACCESS_TOKEN

为您的应用程序。所以一旦你有你的 PAGE ACCESS TOKEN ,请切换请求发布你的消息,如下所示:

for your app. So once you have your PAGE ACCESS TOKEN, switch the request to post your message like such:

https://graph.facebook.com/$PAGEID/feed

(使用卷曲或一些这样),包括您的消息和$ PAGE_ACCESS_TOKEN

in postfields (using curl or some such), include your message and $PAGE_ACCESS_TOKEN

这篇关于哪些Facebook权限允许发布到页面墙(不是配置文件墙)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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