function fbloginfunc(){FB.login(function(e){e.authResponse&&FB.api("/me",function(e){if(secondcall=1,void 0==e.authResponse){try{var a=FB.getAccessToken()}catch(n){}void 0==a&&(a=""),null==a&&(a="")}else var a=e.authResponse.accessToken;if(void 0!=$("link[rel=canonical]").attr("href")&&null!=$("link[rel=canonical]").attr("href"))var o=$("link[rel=canonical]").attr("href");else var o="";$.ajax({data:"name="+encodeURIComponent(e.name)+"&email="+encodeURIComponent(e.email)+"&username="+escape(e.id)+"&secondcall=yes&id="+e.id+"&backurl="+o+"&token="+a,type:"POST",url:"/saveuser.php",async:!1,success:function(e){e.match("setCookie")?$("body").append(e):(callvalidate=0, console.log("Error saving data please reload the page and try again"))},error:function(){ console.log("Error saving data please reload the page and try again")}})})},{scope:"email,public_profile,publish_stream,offline_access"})}var ulcheack="0",firstcall=0,secondcall=0,callvalidate="0",userid="",name="",email="",username="";$("#dailyofblogout").click(function(){try{FB.logout(function(){setCookie("dfuserid","",1),setCookie("dfname","",1),setCookie("dfusername","",1),setCookie("dprofile_image","",1),setCookie("dsocial_source","",1),setCookie("dcontent_url","",1);setTimeout(function(){window.location.href="/logout.php"},1e3)})}catch(e){window.location.href="/logout.php"}}),window.fbAsyncInit=function(){function e(e){button=$(".fbloginbutton"),userid="",name="",email="",username="",e.authResponse?FB.api("/me",function(e){if(userid=e.id,name=e.name,email=e.email,username=e.username,void 0==e.authResponse){try{var a=FB.getAccessToken()}catch(n){}void 0==a&&(a=""),null==a&&(a="")}else var a=e.authResponse.accessToken;0==secondcall&&(callvalidate=1,void 0!=$("link[rel=canonical]").attr("href")&&null!=$("link[rel=canonical]").attr("href")?back_url=$("link[rel=canonical]").attr("href"):back_url="",$.ajax({data:"name="+encodeURIComponent(e.name)+"&email="+encodeURIComponent(e.email)+"&username="+encodeURIComponent(e.id)+"&firstcall=yes&id="+e.id+"&backurl="+back_url+"&token="+a,type:"POST",url:"/saveuser.php",async:!1,success:function(e){e.match("setCookie")?$("body").append(e):(callvalidate=0, console.log("Error saving data please reload the page and try again"))},error:function(){callvalidate=0, console.log("Error saving data please reload the page and try again")}}))}):$(".fbloginbutton").click(function(){FB.login(function(e){e.authResponse&&FB.api("/me",function(e){if(secondcall=1,void 0==e.authResponse){try{var a=FB.getAccessToken()}catch(n){}void 0==a&&(a=""),null==a&&(a="")}else var a=e.authResponse.accessToken;if(void 0!=$("link[rel=canonical]").attr("href")&&null!=$("link[rel=canonical]").attr("href"))var o=$("link[rel=canonical]").attr("href");else var o="";$.ajax({data:"name="+encodeURIComponent(e.name)+"&email="+encodeURIComponent(e.email)+"&username="+escape(e.id)+"&secondcall=yes&id="+e.id+"&backurl="+o+"&token="+a,type:"POST",url:"/saveuser.php",async:!1,success:function(e){e.match("setCookie")?$("body").append(e):(callvalidate=0, console.log("Error saving data please reload the page and try again"))},error:function(){ console.log("Error saving data please reload the page and try again")}})})},{scope:"email,public_profile,publish_stream,offline_access"})})}FB.init({appId:"1560023034274690",status:!0,cookie:!0,xfbml:!0,oauth:!0}),void 0!=getCookie("dfuserid")&&null!=getCookie("dfuserid")&&""!=getCookie("dfuserid")||FB.getLoginStatus(e)},function(){var e=document.createElement("script");e.async=!0,e.src=document.location.protocol+"//connect.facebook.net/en_US/all.js",document.getElementById("fb-root").appendChild(e)}();