Load the Facebook JavaScript SDK Asynchronously
<div class="fb-like-box" | |
data-href="https://www.facebook.com/FacebookDevelopers" | |
data-colorscheme="light" | |
data-show-faces="true" | |
data-header="true" | |
data-stream="false" | |
data-show-border="true" | |
data-height="212"> | |
</div> | |
<script src="//code.jquery.com/jquery-latest.min.js"></script> | |
<script> | |
( function( window, $, undefined ) { | |
// Load the Facebook JavaScript SDK Asynchronously | |
// https://developers.facebook.com/docs/plugins/like-box-for-pages | |
jQuery.ajax({ | |
url: '//connect.facebook.net/en_US/all.js', | |
dataType: 'script', | |
cache: true | |
}).done(function () { | |
$('body').prepend( '<div id="fb-root"></div>' ); | |
FB.init({ | |
appId: '278620438980885', | |
status: false, | |
cookie: true, | |
xfbml: true | |
}); | |
}); | |
} )( window, jQuery ); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment