Reputation: 3463
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
Upvotes: 1
Views: 2773
Reputation: 3463
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
Upvotes: 2
Reputation: 96407
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/
Upvotes: 1