Login by Facebook 

Login to your facebook account then go to this url in another tab  https://developers.facebook.com/apps or Click here

Register for facebook developer account as instructed by wizard 

Then click on create app button to create the app ID . You should get screen like this .

Now for Login With Facebook Click on first card after entering the domain name of the website you will get a script which you need to include in any file for example footer file to get facebook analytics replace {your-app-id} with the id showing you at the topmost left side of the screen  and {api-version} with the version of the api you are targeting (in my case it is v11.0).
<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId      : '{your-app-id}',
      cookie     : true,
      xfbml      : true,
      version    : '{api-version}'
    });
      
    FB.AppEvents.logPageView();   
      
  };

  (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 = "https://connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));
</script>