Facebook publish_action 权限不适用于发帖 [英] Facebook publish_action permission not working for posting

查看:26
本文介绍了Facebook publish_action 权限不适用于发帖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我可以使用我的一些网页的 objectid 向喜欢这些页面的 Facebook 用户发布新闻提要更新.

Currently i can post news feed updates using objectids of some of my web pages to facebook users who have liked those pages.

现在我正在尝试测试新的开放图形和自定义操作以执行相同的操作;向在我的网站上执行特定操作的用户发布更新.但是,即使我的应用程序获得了 publish_actions 权限,并使用我的 facebook 帐户和我的应用程序的一些虚拟测试用户帐户(我知道,在发布时间线之前,只有开发人员和测试用户可以使用所述权限),当我尝试发布时我收到此错误消息:"{"error":{"message":"(#200) 需要扩展权限:publish_actions","type":"OAuthException"}}".

Now i'm trying to test the new open graph and custom actions to do the same; posting updates to users who made a specific action on my web site. But even though i get publish_actions permission with my app, and using my facebook account and some dummy test user accounts for my app (i know that until timeline is released, only devs and test users can use said permission), when i try to post i get this error message: "{"error":{"message":"(#200) Requires extended permission: publish_actions","type":"OAuthException"}}".

我还将我的应用类型更改为游戏,以便我可以从身份验证对话框正确获得 publish_actions 权限.

I also changed my app type to Games so i can properly get publish_actions permission from auth dialog.

有什么想法可以帮助我解决这个问题吗?还是我必须等到时间线发布后才能正确测试新的开放图表发布?

Any ideas that can help me with this? Or do i just have to wait until timeline is released before i can test new open graph posting properly?

发送的请求包含这些参数;

request sent contains these parameters;

to: https://graph.facebook.com/feed
["access_token": "given access token", 
"message": "post message", 
"caption": "post caption", 
"picture":"picture url", 
"link": "link to post", 
"description": "post description", 
"ids": "object ids separated by commas"]

Edit2:我通过添加到时间线按钮请求权限:

I ask for permissions via Add to timeline button:

<fb:add-to-timeline show-faces="true" mode="button" perms="offline_access,publish_actions,publish_stream"></fb:add-to-timeline>

推荐答案

我怀疑您没有正确请求许可.这让我疯狂了几个小时.尽管我正确地请求了许可并且它似乎通过了身份验证,但实际上并未授予许可,因为我没有为开放图正确设置应用程序.

I suspect you are not correctly asking for the permission. This drove me crazy for hours. Even though I was correctly asking for permission and it appeared to authenticate, in reality the permission was not being granted because I had not setup the application correctly for open graph.

当询问 publish_actions 时,Facebook 会显示一个预览屏幕,显示您的应用将在其时间轴上创建的聚合类型.

When asking for publish_actions, Facebook shows a preview screen of what sort of aggregations your app will create on their timeline.

换句话说,如果预览不起作用,Facebook 不会请求许可,因此您的请求是徒劳的.Facebook 没有在文档中明确说明这一点,但一切都需要与您在 Facebook 上的应用完美设置才能使其正常工作.

In other words, if the preview isn't working, Facebook won't ask for the permission so you're asking in vain. Facebook doesn't make this clear in the docs, but everything needs to be perfectly setup with your app on Facebook to get this to work right.

  1. 应用的高级设置
  2. 中启用Enhanced Auth Dialong
  3. 确保您在 open graph 部分至少设置了一个 action 和一个 object
  4. 对于每个 action,您必须设置一个聚合.
  1. Enable Enhanced Auth Dialong in the advanced settings of the app
  2. Make sure you have at least one action and one object set up in the open graph section
  3. For each action you must have an aggregation set up.

如果您不执行所有这些步骤,则无法进行预览,因此 Facebook 无论如何都不会请求许可.

If you do not do all of these steps, there can be no preview and so Facebook won't ask for permission no matter what.

这篇关于Facebook publish_action 权限不适用于发帖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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