0

I am using this function to post on my own wall, and I would like to set the privacy of the post to FRIENDS. But it doesn't work. Always keeps the default app privacy (PUBLIC). How can I change this?

Thanks

function postToWall(message, header) {
    FB.ui(
            {
                method: 'feed',
                caption: header,
                link: 'http://www.iflikeu.com',
                picture: 'http://myapp.herokuapp.com/common/images/icon.png',
                description: message,
                privacy: {'value': 'ALL_FRIENDS'}
            },
            function(response) {
                /*if (response && response.post_id) {
                    alert('Post was published.');
                } else {
                    alert('Post was not published.');
                }*/
            }
    );
}
  • Is this posting to your own wall or to your friends wall. Because according to the [privacy settings](https://developers.facebook.com/docs/reference/api/privacy-parameter/) `Note: The privacy parameter only applies for posts to the user's own timeline and is ultimately governed by the privacy ceiling a user has configured for an app. It does not apply to posts made by an app on behalf of a user to another user's timelines or to Pages, events, or groups. In those cases, such posts are viewable by anyone who can see the timeline or content in the group or event.` – Usha Dec 20 '12 at 21:26
  • It is on my own wall. Any ideas? Thanks –  Dec 20 '12 at 21:32

2 Answers2

0

Your example is a call to FB.ui() which triggers the feed dialog - the user selects the privacy for such posts on a post by post basis

If you're posting directly via the API you'd be calling FB.api() where you can set the privacy per-post directly; using the Dialog the user can always choose post visibility, and the value in the selector defaults to their default privacy setting for your app

Igy
  • 43,710
  • 8
  • 89
  • 115
0

You can try to edit the Application settings : Configuring Permissions. And set Default Activity Privacy: to public.

Laurent Roger
  • 198
  • 1
  • 9