title: How do I store the ID and email into a database?
body: <p>I keep trolling the internet for tutorials on how to do this to no avail. I followed <a href="https://developers.facebook.com/docs/guides/web/" rel="nofollow noreferrer">this</a>
  on getting it set up, but it doesn't go through how to save the information received. Actually it doesn't go through if there <em>is</em> and information received.</p>
  <p>Thanks so much!!</p>
  <p>more information.
  What I want to do is have a FB login to my site. If it is a fist time user, I want his ID, name, and email saved to a database. If it's an old user, then I need his ID to check it against the database.</p>
  <p>heres my current code:</p>
  <pre><code> &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;My Facebook Login Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;
    &lt;script&gt;
      window.fbAsyncInit = function() {
        FB.init({
          appId      : '223157403572264',
          status     : true, 
          cookie     : true,
          xfbml      : true,
          oauth      : true,
        });
      };
      (function(d){
         var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
         js = d.createElement('script'); js.id = id; js.async = true;
         js.src = &quot;//connect.facebook.net/en_US/all.js&quot;;
         d.getElementsByTagName('head')[0].appendChild(js);
       }(document));
    &lt;/script&gt;
    &lt;div class=&quot;fb-login-button&quot; data-scope=&quot;email,user_checkins&quot;&gt;
      Login with Facebook
    &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
   
  <p>edit- more information</p>
  <p>edit2- my code</p>