title: how to get email id of Facebook user using javascript sdk
body: <p>I am using JavaScript API to create my app for Facebook. The problem is, it's returning<br>
  <code>email = undefined</code>.  </p>
  
  <p>I don't know why? And if I use Facebook login/logout button on my app then the alert shows correct email id of the user but I don't want to do that.
  What am I missing? </p>
  
  <p>Here is my code: </p>
  
  <pre><code>&lt;p&gt;&lt;fb:login-button autologoutlink="true" perms="user_about_me,email"&gt;&lt;/fb:login-button&gt;&lt;/p&gt;
  
  &lt;script&gt;
  window.fbAsyncInit = function () {
    FB.init({ appId: '250180631699888', status: true, cookie: true,
    xfbml: true
  });
  
    FB.getLoginStatus(function (response) {
      if (response.session) {
        greet();
      }
    });
  };
  (function () {
    var e = document.createElement('script');
    e.type = 'text/javascript';
    e.src = document.location.protocol +
    '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
  } ());
  
  function greet() {
    FB.api('/me', function (response) {
    alert('Welcome, ' + response.name + "!");
    alert('Your email id is : '+ response.email);
  });
  }
  &lt;/script&gt;
  </code></pre>