 function statusChangeCallback(response) {
    console.log('statusChangeCallback');
    console.log(response);
    // The response object is returned with a status field that lets the
    // app know the current login status of the person.
    // Full docs on the response object can be found in the documentation
    // for FB.getLoginStatus().
    if (response.status === 'connected') {
      // Logged into your app and Facebook.
      testAPI();
    } else if (response.status === 'not_authorized') {
      // The person is logged into Facebook, but not your app.
      document.getElementById('status').innerHTML = 'Please log ' +
        'into this app.';
    } else {
      // The person is not logged into Facebook, so we're not sure if
      // they are logged into this app or not.
      document.getElementById('status').innerHTML = 'Please log ' +
        'into Facebook.';
    }
  }

  // This function is called when someone finishes with the Login
  // Button.  See the onlogin handler attached to it in the sample
  // code below.
  function checkLoginState() {
    FB.getLoginStatus(function(response) {
      statusChangeCallback(response);
    });
  }

  window.fbAsyncInit = function() {
  FB.init({
    appId      : '971388552927772',
    cookie     : true,  // enable cookies to allow the server to access 
                        // the session
    xfbml      : true,  // parse social plugins on this page
    version    : 'v2.2' // use version 2.2
  });

  // Now that we've initialized the JavaScript SDK, we call 
  // FB.getLoginStatus().  This function gets the state of the
  // person visiting this page and can return one of three states to
  // the callback you provide.  They can be:
  //
  // 1. Logged into your app ('connected')
  // 2. Logged into Facebook, but not your app ('not_authorized')
  // 3. Not logged into Facebook and can't tell if they are logged into
  //    your app or not.
  //
  // These three cases are handled in the callback function.

  FB.getLoginStatus(function(response) {
    statusChangeCallback(response);
  });

  };

  // Load the SDK asynchronously
  (function(d, s, id) {
    var js, 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'));

  // Here we run a very simple test of the Graph API after login is
  // successful.  See statusChangeCallback() for when this call is made.
  function testAPI() {
    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 + '!';
    });
  }

@@ -1,1294 +1,336 @@
- function statusChangeCallback(response) %7B%0D%0A    console.log('statusChangeCallback');%0D%0A    console.log(response);%0D%0A    // The response object is returned with a status field that lets the%0D%0A    // app know the current login status of the person.%0D%0A    // Full docs on the response object can be
+Parse.initialize(%227YyZO6oZNVongKR6pluyULEkMEmvLVRtVZvd6OXn%22, %22JTOrsTnWqTBhxqxFMEvPdOUzDd9Ro01JqpiAF003%22);%0D%0A      window.fbAsyncInit =
  f
-o
 un
-d in the documentation%0D%0A    // for FB.getLoginStatus().%0D%0A    if (response.status === 'connected') %7B%0D%0A      // Logged into your app and Facebook.%0D%0A      testAPI();%0D%0A    %7D else if (response.status === 'not_authorized') %7B%0D%0A      // The person is logged into Facebook, but not your app.%0D%0A      document.getElementById('status').innerHTML = 'Please log ' +%0D%0A        'into this app.';%0D%0A    %7D else %7B%0D%0A      // The person is not logged into Facebook, so we're not sure if%0D%0A      // they are logged into this app or not.%0D%0A      document.getElementById('status').innerHTML = 'Please log ' +%0D%0A        'into Facebook.';%0D%0A    %7D%0D%0A  %7D%0D%0A%0D%0A  // This function is called when someone finishes with the Login%0D%0A  // Button.  See the onlogin handler attached to it in the sample%0D%0A  // code below.%0D%0A  function checkLoginState() %7B%0D%0A    FB.getLoginStatus(function(response) %7B%0D%0A      statusChangeCallback(response);%0D%0A    %7D);%0D%0A  %7D%0D%0A%0D%0A  window.fbAsyncInit = function() %7B%0D%0A  FB.init(%7B%0D%0A    appId      : '971388552927772',%0D%0A
+ction() %7B%0D%0A    Parse.FacebookUtils.init(%7B // this line replaces FB.init(%7B%0D%0A      appId      : '%7Bfacebook-app-id%7D', // Facebook App ID%0D%0A      status     : true,  // check Facebook Login status%0D%0A  
     
@@ -380,18 +380,13 @@
 low 
-the server
+Parse
  to 
@@ -396,37 +396,8 @@
 ess 
-%0D%0A                        // 
 the 
@@ -409,16 +409,18 @@
 on%0D%0A    
+ 
+ 
 xfbml   
@@ -438,13 +438,27 @@
  // 
-parse
+initialize Facebook
  soc
@@ -478,17 +478,18 @@
 n th
-is
+e
  page%0D%0A
+  
     
@@ -509,698 +509,140 @@
 'v2.
-2
+3
 ' // 
-use version 2.2%0D%0A  %7D);%0D%0A%0D%0A  // Now that we've initialized the JavaScript SDK, we call %0D%0A  // FB.getLoginStatus().  This function gets the state of the%0D%0A  // person visiting this page and can return one of three states to%0D%0A  // the callback you provide.  They can be:%0D%0A  //%0D%0A  // 1. Logged into your app ('connected')%0D%0A  // 2. Logged into Facebook, but not your app ('not_authorized')%0D%0A  // 3. Not logged into Facebook and can't tell if they are logged into%0D%0A  //    your app or not.%0D%0A  //%0D%0A  // These three cases are handled in the callback function.%0D%0A%0D%0A  FB.getLoginStatus(function(response) %7B%0D%0A    statusChangeCallback(response);
+point to the latest Facebook Graph API version%0D%0A    %7D);%0D%0A%0D%0A        // Run code after the Facebook SDK is loaded.
 %0D%0A  %7D
-)
 ;%0D%0A%0D%0A  
-%7D;%0D%0A%0D%0A  // Load the SDK asynchronously%0D%0A
+  
   (f
@@ -658,17 +658,16 @@
 , s, id)
- 
 %7B%0D%0A    v
@@ -744,15 +744,17 @@
 d)) 
+%7B
 return;
+%7D
 %0D%0A  
@@ -938,462 +938,15 @@
 );%0D%0A
-%0D%0A  // Here we run a very simple test of the Graph API after login is%0D%0A  // successful.  See statusChangeCallback() for when this call is made.%0D%0A  function testAPI() %7B%0D%0A    console.log('Welcome!  Fetching your information.... ');%0D%0A    FB.api('/me', function(response) %7B%0D%0A      console.log('Successful login for: ' + response.name);%0D%0A      document.getElementById('status').innerHTML =%0D%0A        'Thanks for logging in, ' + response.name + '!';%0D%0A    %7D);%0D%0A  %7D
+%3C/script%3E
 %0D%0A

Update main.js