Having trouble with integrating facebook authentication
===

I'm following: https://developers.facebook.com/docs/guides/web/

My website has its own login system (which is written in Django/Python). Without using django-social-auth kind of plugin, i want to integrate facebook authentication to my web app. 

    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({
          appId      : '{{facebook_app_id}}', // App ID
          channelUrl : '//{{host_name}}/external/fb_channel', // Channel File
          status     : true, // check login status
          cookie     : true, // enable cookies to allow the server to access the session
          xfbml      : true  // parse XFBML
        });
        // Additional initialization code here
      };
      // Load the SDK Asynchronously
      (function(d){
         var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
         if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = "//connect.facebook.net/en_US/all.js";
         ref.parentNode.insertBefore(js, ref);
       }(document));
    </script>

However, i've followed the instruction (https://developers.facebook.com/docs/guides/web/) and the login button shows as expected and when clicked, popup windows shows to allow my application. (I'm running my server at 127.0.0.1 which is localhost)

So, what's next? When user clicks to login and allow it, I was expecting to do some server side validation to log my user in with fb account. But I'm not sure what to do now.

After clicking to login with FB, it flickers and does not hit my server. Need some guidance.

Thank you.