Link to home
Start Free TrialLog in
Avatar of Qw M
Qw MFlag for United States of America

asked on

Facebook login javascript call

Hi,

I need to build a Facebook login for my site.
I have the code from developers.facebook.com. I am using the code from "full code example". The code is working fine. I am receiving the user id and the user email.
I need a way to insert this data in a database table. How can I do this?

Thank you,
Cristian


  function testAPI() {
//-> here to insert  response.name and response.email into my table
    console.log('Welcome!  Fetching your information.... ');
    FB.api('/me?fields=id,name,email', function(response) {
      console.log('Successful login for: ' + response.name);
      document.getElementById('status').innerHTML =
        'Thanks for logging in, ' + response.name + '!' + response.email;
    });
  }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial