Facebook Open Graph API返回:(#200)需要扩展权限:publish_actions [英] Facebook Open Graph API returns: (#200) Requires extended permission: publish_actions
问题描述
我要求发布publish_actions权限,启用增强型验证对话框,我的角色设置为开发人员,我的应用设置显示此应用可能会以您的身份发布,包括您查看的图片等。
请求
$ facebook-> api('/ me / permissions');
返回
array(1){[data] => array(1){[0] => array(2){[installed] => int(1)[publish_actions] => int(1)}}}
然而,当我发送以下发布请求时,
$ data = array();
$ data ['access_token'] = $ facebook-> getAccessToken();
$ data ['pictureabc'] ='http:// ### url ###';
$ facebook-> api($ app_id。'/ liveluvcreate:viewabc','post',$ data);
我得到
code>致命错误:未捕获OAuthException:(#200)需要扩展权限:publish_actions throw ...
任何建议?
Best,Sebastian
可能 $ app_id
不是用户拥有 access_token
。
您最好使用 / me / liveluvcreate:viewabc
只是为了确保您发布操作用户拥有 access_token
,以及谁的 publish_actions
授予您的应用程序。
$ facebook-> api('/ me / liveluvcreate:viewabc','post',$ data);
I am trying to publish actions to a user's wall using the Open Graph API.
I requested the 'publish_actions' permission, enabled the 'Enhanced Auth Dialog', my role is set to 'developer' and my app settings show 'This app may post on your behalf, including pictureabcs you viewabcked and more.'.
Requesting
$facebook->api('/me/permissions');
returns
array(1) { ["data"]=> array(1) { [0]=> array(2) { ["installed"]=> int(1) ["publish_actions"]=> int(1) } } }
However, when I send the following post request
$data = array();
$data['access_token'] = $facebook->getAccessToken();
$data['pictureabc'] = 'http://###url###';
$facebook->api($app_id . '/liveluvcreate:viewabc', 'post', $data);
I get
Fatal error: Uncaught OAuthException: (#200) Requires extended permission: publish_actions thrown...
as result.
Any suggestions?
Best, Sebastian
Probably $app_id
is not the id of user owning the access_token
.
You better use /me/liveluvcreate:viewabc
just to be sure you publishing action to user owning access_token
and who have publish_actions
granted to your app.
$facebook->api('/me/liveluvcreate:viewabc', 'post', $data);
这篇关于Facebook Open Graph API返回:(#200)需要扩展权限:publish_actions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!