Facebook Open Graph API returns: (#200) Requires extended permission: publish_actions

别说谁变了你拦得住时间么 提交于 2019-12-20 03:07:58

问题


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


回答1:


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);



回答2:


I know it might be very late to post an answer[but it might be helpful to others], but as of 2014 if you want to post anything to the user[apart from the app registered developer] timeline you need Facebook permission i.e the app needs to be submitted for approval Please refer the following link https://developers.facebook.com/docs/facebook-login/permissions/v2.0

you can check that it's right below the overview section.



来源:https://stackoverflow.com/questions/10473797/facebook-open-graph-api-returns-200-requires-extended-permission-publish-ac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!