Skip to content

Commit

Permalink
Always init Facebook async
Browse files Browse the repository at this point in the history
  • Loading branch information
j15e committed Jan 6, 2014
1 parent fd8f47e commit eb44e94
Showing 1 changed file with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,7 @@ var CustomSchedule = (function($, window, document, undefined) {
}
}



if(typeof FB != undefined){
FB.init(fb_conf);

FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
self.facebookConnected = true;
$('.facebook-login').css('display','none');
$('.facebook-logout').css('display','block');
self.fbInitPhp(function(){self.getUserSessions();});
}
else{
$('.facebook-login').css('display','block');
$('.facebook-logout').css('display','none');
self.getUserSessions();
self.loadSessions();
}
});
}
else{
window.fbasyncinit = function(){
window.fbAsyncInit = function(){
FB.init(fb_conf);

FB.getLoginStatus(function(response) {
Expand All @@ -90,7 +69,6 @@ var CustomSchedule = (function($, window, document, undefined) {
self.loadSessions();
}
});
}
}

self.bindEvents();
Expand Down

0 comments on commit eb44e94

Please sign in to comment.