1

I have a page tab and want to allow users to share some content in their wall, friends wall or by a private message to a friend.

I'm currently using:

function postToFeed() {

            // calling the API ...
            var obj = {
              method: 'feed',
              link: 'page url',
              picture: 'image url',
              name: 'Facebook Dialogs',
              caption: 'Reference Documentation',
              description: 'Using Dialogs to interact with users.'
            };

            function callback(response) {
              document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
            }

            FB.ui(obj, callback);
        }

This works fine but only allows to share in my wall.

So the question is... Is there any dialog or way to allow the three features on the same dialog?

I saw 'send' dialog to send a private message but couldn't find the share on friend wall dialog.

Ideally I wanted to have only a share button and allow the three options after clicking.

Any idea?

Thanks

jribeiro
  • 3,387
  • 8
  • 43
  • 70

2 Answers2

2

For the stumblers there isn't a proper official way to do this. However it's still possible to implement it by using the sharer.php technique https://stackoverflow.com/a/12799020/691553

Cheers

Community
  • 1
  • 1
jribeiro
  • 3,387
  • 8
  • 43
  • 70
  • Your answer is very useful, except at the moment FB isn't saying that Sharer is deprecated: http://developers.facebook.com/docs/reference/plugins/share-links – Cristian Jul 18 '13 at 11:53
  • it was at the time :) Edited the answer. Thanks for the heads up – jribeiro Jul 18 '13 at 23:41
1

You can use the Feed dialog to share on a friend’s wall, if you provide the to parameter.

To get a userid to send “to” before opening the dialog, you could implement your own friend selector in the way described here: https://developers.facebook.com/docs/guides/games/custom-muti-friend-selector/

CBroe
  • 91,630
  • 14
  • 92
  • 150