开发者

Facebook authorization

开发者 https://www.devze.com 2023-02-15 18:51 出处:网络
I have developed an moderation app in php through which I moderate all the posts and comments. I also have an option to post a POST on facebook fan page wall. But when I try to do so an exception is b

I have developed an moderation app in php through which I moderate all the posts and comments. I also have an option to post a POST on facebook fan page wall. But when I try to do so an exception is been thrown that says "The user hasn't authorized the application to perform this action".

Any help on this!!! Thanks

Update

Here I ask for the permissions from user to POST through fan page

$hasPermission = $facebook->api_client->call_method('Users.hasAppPermission',array('ext_perm'=>'publish_stream', 'uid'=>$fbuid));
        $hasPermission_offline = $facebook->api_client->call_method('Users.hasAppPermission',array('ext_perm'=>'offline_access', 'uid'=>$fbuid));

Here I try to publish the post on wall of the page

$facebook开发者_运维技巧->api_client->stream_publish(strip_tags(html_entity_decode($rowdata['posttext'])),$objAttachment, '', $objfbpharmawall->pageid, $uid)


You need to take extended permissions first : http://developers.facebook.com/docs/authentication/

Btw do not post anything without user approval even if you have taken the extended permission. That is against Facebook policy and they might block your application.

0

精彩评论

暂无评论...
验证码 换一张
取 消