Created
March 25, 2014 14:40
-
-
Save deanc/9763197 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getScript('//connect.facebook.net/en_UK/all.js', function(){ | |
FB.init({ | |
appId: 'APPID', | |
channelUrl: '//siteurl.com/channel.html', | |
}); | |
$("#some-btn-id").click(function () { | |
FB.ui( | |
{ | |
method: 'feed', | |
name: 'Title of the share', | |
link: 'http://example.com/', | |
picture: 'http://example.com/logo.png', | |
//caption: 'Reference Documentation', | |
description: 'Description body text for the share' | |
}, | |
function(response) { | |
if (response && response.post_id) { | |
} else { | |
// post was not published... | |
} | |
} | |
); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment