JSFiddle - React, Tailwind, and code Playground
HTML
<iframe src="//www.facebook.com/plugins/likebox.php?href=http://facebook.com/cocacola&width=292&height=290&show_faces=true&colorscheme=light&stream=false&show_border=true&header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:290px;" allowTransparency="true"></iframe>
JavaScript
$(document).ready(function(){
FB.login(function(response) {
if (response.session) {
var user_id = response.session.uid;
var page_id = "40796308305";
var fql_query = "SELECT uid FROM page_fan WHERE page_id = "+page_id+"and uid="+user_id;
var the_query = FB.Data.query(fql_query);
the_query.wait(function(rows) {
if (rows.length == 1 && rows[0].uid == user_id) {
//fan
alert("Hi Like Box");
} else {
//not like
alert("Hi You Are Not Like");
}
});
} else {
// user is not logged in
alert("You Are Not Logged In");
}
});