title: Not Able to get email of user logged in via fb account in my site
body: <p>I am making a site to make people login via their Facebook account. </p>
  
  <p>I am able to fetch Name and the users image but I'm not getting users email. Email is returning as undefined. My code for Facebook login is:</p>
  
  <pre><code>window.fbAsyncInit = function() {
  FB.init({
        appId      : 'XXXXXXXXXXXXXXXX', // Set YOUR APP ID
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
  });
  FB.Event.subscribe('auth.authResponseChange', function(response) 
  {
       if (response.status === 'connected') 
  {
  document.getElementById("message").innerHTML +=  "&lt;br&gt;";
  }    
  else if (response.status === 'not_authorized') 
  {
  } 
  }); 
  };
  function Login()
  {
  FB.login(function(response) {
  if (response.authResponse) 
  {
  getUserInfo();
   getPhoto();
  } else 
  {
   console.log('User cancelled login or did not fully authorize.');
  }
  },{scope: 'email,user_photos,user_videos'});
  }
  function getUserInfo() {
  FB.api('/me', function(response) {
  var str="You have succesfully logged in&lt;br&gt;";
   var name=response.name;
  var email=response.email;
   console.log(name+email);
  });
  $(document).ajaxStop(function(){
      window.location.reload();
  });
      }
      function getPhoto()
      {
  FB.api('/me/picture?type=normal', function(response) {
  var str="&lt;br/&gt;&lt;b&gt;Pic&lt;/b&gt; : &lt;img src='"+response.data.url+"'/&gt;";
  $('#getphoto').html(str);
  });
  }
  function Logout()
  {
  FB.logout(function(){document.location.reload();});
  }
   // 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));
  </code></pre>
  
  <p>I've tried to get the email by all ways mentioned in Stack Overflow and  developers.facebook.com, but failed.</p>
  
  <p>Trigger for the Facebook login:</p>
  
  <pre><code>&lt;img src='img/fblogin.jpg' onclick='login()'&gt;
  </code></pre>
  
  <p>I tried to alert response properties by <code>
  for (key in response){ alert("response["+ key +"]="+ response[key]); }</code> 
  it is returning name and id not email</p>