JSFiddle - React, Tailwind, and code Playground
by tebrown
HTML
<div id="fb-root"></div>
<a id ="share_button" href="#">Open</a>
<script type = "text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '151438351665894',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script type = "text/javascript">
$(document).ready(function() {
$('#share_button').live('click', function(e) {
e.preventDefault();
FB.ui({
method: 'feed',
name: 'This is the content of the "name" field.',
link: 'http://www.mysite.co.nz/',
redirect_uri: 'http://www.mysite.co.nz/',
caption: 'This is the content of the "caption" field.',
description: 'This is the content of the description',
message: 'This is text in the message box'
});
});
});
</script>