title: How to get email and username from a Facebook login button?
body: <p>We want to allow users to log into our site though Facebook. But how can I get Facebook's button to return the user's email and username?</p>
  
  <p>right after the body tags:</p>
  
  <pre><code>&lt;script&gt;
      window.fbAsyncInit = function() {
          FB.init({
              appId      : '331796760587640',
              cookie     : true,
              xfbml      : true,
              version    : 'v2.9'
          });
          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 = "//connect.facebook.net/en_US/sdk.js";
          fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
  
  &lt;/script&gt;
  </code></pre>
  
  <p>in the nav bar (or login menu):</p>
  
  <pre><code>&lt;div class="fb-login-button" data-max-rows="1" data-size="small" data-button-type="login_with" data-show-faces="false" data-auto-logout-link="false" data-use-continue-as="false"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>but looks like this just logs them into Facebook, not to our site. How can i get the user's email and username after they click the button? Something like this:</p>
  
  <pre><code>var username = ???
  var email = ???
  attempt_login(username, email);
  </code></pre>