Question

I write down a code in javascript for posting message on Face-Book. I posted it successfully but it's always showing only me privacy statement. I really want to post this message publicly.

I try to set privacy = { 'value': 'EVERYONE' }; . still message posting private(only me).

My code is-

     var privacy = { 'value': 'EVERYONE' };
        var txt = 'my post to test feed post using api';
        FB.api('me/feed', 'post', { message: txt, privacy: privacy }, function (response) {
            if (!response || response.error) {
                alert(JSON.stringify(response.error));
            } else {
                alert('Post ID: ' + response.id);
            }
        });

How can i post it publicly ?

thanks a bunch for your valuable help.

Was it helpful?

Solution

Did you manually set the privacy of the application when you added your application? If you go to your Facebook Settings, see what you set your application to. The privacy parameter is restricted to what the user sets on their account.

E.g. If the user has set "Friends", but the app uses "Public", then the user's preference is used. But if the user has set "Public", but the app uses "Friends", then the app's setting is used, as it's more restrictive than the User's settings.

In short, the most restrictive privacy setting between the User and Application will take priority.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top