  window.fbAsyncInit = function() { 
    FB.init({ 
      appId  : '129374263760097', 
      status : true, // check login status 
      cookie : true, // enable cookies to allow the server to access the session 
      xfbml  : true  // parse XFBML 
    });
	FB.Event.subscribe('auth.login', function(response) {
        window.location.reload();
		});
	FB.Event.subscribe('auth.sessionChange', function(response) {
    if (response.session) {
      // A user has logged in, and a new cookie has been saved
    } else {
      // The user has logged out, and the cookie has been cleared
    }
  });
};  

  (function() { 
    var e = document.createElement('script'); 
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; 
    e.async = true; 
    document.getElementById('fb-root').appendChild(e); 
  }());
