eXTReMe Tracker
var m_lstUsers = null; window.fbAsyncInit = function () { FB.init({ appId: '<%=ConfigurationManager.AppSettings["Ott.FacebookSignInApplicationID"] %>', // App ID channelUrl: '<%=Request.Url.Host %>/admin/fbChannel.html', // Channel File status: true, // check login status cookie: true, // enable cookies to allow the server to access the session oauth: true, // enable OAuth 2.0 xfbml: true // parse XFBML }); var strUrl = window.location.href; if (strUrl.indexOf("FbAuthorized=true") > -1) { var strParameters = strUrl.substring(strUrl.indexOf("#")); var vars = []; var hashes = strParameters.split('&'); for (var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } var strCode = ""; var strAccessToken = vars["#access_token"]; FB.api('/me?access_token=' + strAccessToken, function (response) { var strFbID = response.id; LoginViaFacebook(strFbID, strAccessToken, strCode); }); } }; // Load the SDK Asynchronously $(document).ready(function () { (function (d) { var js, id = 'facebook-jssdk'; if (d.getElementById(id)) { return; } js = d.createElement('script'); js.id = id; js.async = true; js.src = "//connect.facebook.net/en_US/all.js"; d.getElementsByTagName('head')[0].appendChild(js); } (document)); });