Publising some thing to facebook friends feeds
Salam, Hi and Hello,
I am using FB.ui method of Facebook Javascript SDK and it says, "post to your wall", I want to publish story on facebook friend's wall or in feeds. So is it possible to post story on friends feeds other than your own wall? If yes then how? I doubt that it was only possible in depreciated libraries?
I am currently using following code:
FB.ui({'method': 'stream.publish',
'from':from_user_id,
'display':'iframe',
'attachment':attachment,
'description': '',
'message': message,
'user_prompt_message': "Personailze Message",
'a开发者_开发技巧ction_links': [
{ text: 'AppName', href: canvasURL }
]
},
function(response){
});
A Dialog is appearing but it says, "Post to Your Wall" But What I want is that it say post to Your wall and Your Friends Home Page? as here: http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development/
I followed this tutorial but it is still saying: "Post to Your Wall"
So is there any clue? That How can I achieve the intended functionality? Waiting for your response.
thanks in advance
thanks
If you want to post on any friends wall you have to add the friends id so it'll look like this
FB.ui(
{
method: 'feed',
name: 'NAME',
link: 'LINK OF THE WEBSITE OR PAGE',
picture: 'IMAGE_URL IF YOU NEED IT',
caption: 'Reference Documentation',
description: "DESCRIPTION",
to:FRIENDS_ID
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
精彩评论