JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body" id="likeBox"></div>
</div>
</div>
<div id="fb-root"></div>
JavaScript
window.fbAsyncInit = function () {
FB.init({
appId: '553435274702353',
status: true,
xfbml: true
});
FB.getLoginStatus(function (response) {
if (response.status === 'not_authorized') {
// the user is logged in to Facebook,
// but has not authenticated your app
$('#likeBox').html('<p>Like us on Facebook!</p><iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fretrogram&width&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=false&appId=1386221538296899" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:258px;" allowTransparency="true"></iframe>');
} else {
// the user isn't logged in to Facebook.
$('#likeBox').html('This is fallback text!');
}
});
};
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));