title: Get User Detail using Facebook API
body: <p>I am use this functions for get Facebook user detail</p>
  
  <pre><code>    &lt;script&gt;
        function statusChangeCallback(response) {
          console.log('statusChangeCallback');
          console.log(response);
          if (response.status === 'connected') {
            testAPI();
          } else if (response.status === 'not_authorized') {
            document.getElementById('status').innerHTML = 'Please log ' +
              'into this app.';
          } else {
            document.getElementById('status').innerHTML = 'Please log ' +
              'into Facebook.';
          }
        }
  
        function checkLoginState() {
          FB.getLoginStatus(function(response) {
            statusChangeCallback(response);
          });
        }
  
        window.fbAsyncInit = function() {
        FB.init({
          appId      : 'I enter here my aplication ID',
          cookie     : true,  
          xfbml      : true,  
          version    : 'v2.1' 
        });
        FB.getLoginStatus(function(response) {
          statusChangeCallback(response);
        });
  
        };
  
    (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'));
  
        function testAPI() {
          console.log('Welcome!  Fetching your information.... ');
          FB.api('/me?fields=id,first_name,last_name,email,gender,birthday,bio,hometown,education,quotes,cover,work,devices', function(response) {
            console.log('Successful login for: ' + response.name);
            document.getElementById('status').innerHTML =
              'Thanks for logging in, &lt;br /&gt;&lt;br /&gt;' 
              + response.id + '&lt;br /&gt;'
              + response.first_name + '&lt;br /&gt;'
              + response.last_name + '&lt;br /&gt;'
              + response.name + '&lt;br /&gt;'
              + response.email + '&lt;br /&gt;'
              + response.gender + '&lt;br /&gt;'
              + response.birthday + '&lt;br /&gt;'
              + response.bio + '&lt;br /&gt;'
              + response.quotes + '&lt;br /&gt;'
              + response.location.name + '&lt;br /&gt;'
              + response.hometown.name + '&lt;br /&gt;'
              ;
          });
        }
  
      &lt;/script&gt;
      &lt;fb:login-button scope="public_profile,email, user_birthday, user_hometown, user_location, user_likes, user_activities, user_education_history, user_work_history, user_about_me" onlogin="checkLoginState();" data-auto-logout-link="true"&gt;
      &lt;/fb:login-button&gt;
  </code></pre>
  
  <p>But It is work only for me which create this application</p>
  
  <p>for other users some fields is undefined </p>
  
  <p>ex- birthday,bio,quotes,location,hometown,education,work</p>
  
  <h2>In this way output for me(who create application ID)</h2>
  
  <p>Thanks for logging in, </p>
  
  <p>677362262358935</p>
  
  <p>Deep</p>
  
  <p>Panchal</p>
  
  <p>Deep Panchal</p>
  
  <p>panchaldeep009@gmail.com</p>
  
  <p>male</p>
  
  <p>10/15/1997</p>
  
  <p>Web Developer, Programmer, Electronics &amp; Communication Engineer.</p>
  
  <p>Be-live in Truth,</p>
  
  <p>Vagra, Gujarat, India</p>
  
  <p>Vagra, Gujarat, India</p>
  
  <h2>But for other User</h2>
  
  <p>Thanks for logging in, </p>
  
  <p>XXXXXXXXXXXXXX   (id)</p>
  
  <p>first name</p>
  
  <p>lastname</p>
  
  <p>name</p>
  
  <p>email@mail.com</p>
  
  <p>male</p>
  
  <p>undefined (birthday)</p>
  
  <p>undefined (bio)</p>
  
  <p>undefined (quotes)</p>
  
  <p>undefined (hometown)</p>
  
  <p>undefined (location)</p>