publish_stream message visibility to everyone

不羁岁月 提交于 2019-12-11 00:44:16

问题


I use Facebook PHP API to publish to profile's news feed:

    $this->facebook->api('/me/feed', 'POST', array(
      'message' => $msg,
      'link' => 'http://'.$_SERVER['SERVER_NAME'],
      'privacy' => array('value' => 'EVERYONE')
    ));

but this message is visible only to friends. I want it to be publicly visible to everyone! Even non-friends. How to do this ?


回答1:


You, for security reasons, cannot override a user's choice on how your app posts messages. The best you can do is to change the default visibility setting of your app (https://developers.facebook.com/apps/{APPID}/auth) to Everyone, and then let the user change it to something else when authorizing your app. The user also has a chance to change the setting in own settings at any time later.



来源:https://stackoverflow.com/questions/8980807/publish-stream-message-visibility-to-everyone

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