To like and share the application when the user clicks on share button in facebook
Hi I am a ruby on rails developer and now working on the f开发者_如何学Pythonacebook. Any one please give a suggestion so that to like and share the application when the user clicks on share button on facebook.
Put this inside of your facebook-SDK:
$(function(){
$('ID/CLASS OF YOUR BUTTON').click(function(e){
e.preventDefault();
FB.ui({
method: 'feed',
name: 'NAME YOU WANT',
link: 'YOUR LINK',
picture: YOUR URL OF YOUR PICTURE
caption: 'YOUR CAPTION',
description: 'YOUR DESCRIPTION',
});
});
});
精彩评论