我用 php 开发了一个审核应用程序,通过它我可以审核所有帖子和评论。我还可以选择在 Facebook 粉丝页面墙上发布帖子。但是,当我尝试这样做时,会引发异常,显示“用户尚未授权应用程序执行此操作”。
有什么帮助吗!!!谢谢
更新
这里我请求用户通过粉丝页面发布帖子的权限
$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));
这里我尝试将帖子发布到页面墙上
$facebook->api_client->stream_publish(strip_tags(html_entity_decode($rowdata['posttext'])),$objAttachment, '', $objfbpharmawall->pageid, $uid)
最佳答案
您需要首先获得扩展权限: http://developers.facebook.com/docs/authentication/
顺便说一句,即使您已获得扩展权限,也不要在未经用户批准的情况下发布任何内容。这违反了 Facebook 政策,他们可能会阻止您的应用程序。
关于php - Facebook 授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5256689/