text: // Generated by CoffeeScript 1.12.7
  (function() {
    var checkLoginState, statusChangeCallback, testAPI;
  
    statusChangeCallback = function(response) {
      console.log("statusChangeCallback");
      console.log(response);
      if (response.status === "connected") {
        R.loggedIntoFacebook = true;
      } else if (response.status === "not_authorized") {
        console.log("Please log into this app.");
      } else {
        console.log("Please log into Facebook.");
        R.loggedIntoFacebook = false;
      }
    };
  
    checkLoginState = function() {
      FB.getLoginStatus(function(response) {
        statusChangeCallback(response);
      });
    };
  
    testAPI = function() {
      console.log("Welcome!  Fetching your information.... ");
      FB.api("/me", function(response) {
        console.log("Successful login for: " + response.name);
        document.getElementById("status").innerHTML = "Thanks for logging in, " + response.name + "!";
      });
    };
  
    window.fbAsyncInit = function() {
      FB.init({
        appId: "401623863314694",
        cookie: true,
        xfbml: true,
        version: "v2.0"
      });
      FB.getLoginStatus(function(response) {
        statusChangeCallback(response);
      });
    };
  
    (function(d, s, id) {
      var fjs, js;
      js = void 0;
      fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) {
        return;
      }
      js = d.createElement(s);
      js.id = id;
      js.src = "//connect.facebook.net/en_US/sdk.js";
      fjs.parentNode.insertBefore(js, fjs);
    })(document, "script", "facebook-jssdk");
  
  }).call(this);
  