Check how Master Pages Facebook Log Pole Easy
in this article I will guide you to the page rather check facebook login on your website, very simple, you just need to copy and paste the following code into the code and see the results offline
<div id="fb-root"></div>
<script>
(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/vi_VN/all.js#xfbml=1&status=1&cookie=1&appId=id-application";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
window.fbAsyncInit = function() {
FB.getLoginStatus(function(response) {
if (response.status == 'connected' || response.status == 'not_authorized') {
alert(response.status);
alert('da dang nhap');
}else{
alert('chua dang nhap');
}
});
};
</script>
briefly explained to her this is the code of the library declaration facebook, facebook of running the code you must declare this run can be defined functions facebook
<div id="fb-root"></div>
<script>
(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/vi_VN/all.js#xfbml=1&status=1&cookie=1&appId=768267353213913";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
while the remaining code’m looking at everyone understands that it is used to consider two cases are logged and not logged.
in section 2 cso logged more cases are logged (connected) and has not yet authenticated login (not_authorized)
surely you will do, this is one of the applications of facebook