问题
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