Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7008269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:42:47+00:00 2026-05-27T21:42:47+00:00

I keep trolling the internet for tutorials on how to do this to no

  • 0

I keep trolling the internet for tutorials on how to do this to no avail. I followed this
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 is and information received.

Thanks so much!!

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.

heres my current code:

 <html>
<head>
  <title>My Facebook Login Page</title>
</head>
<body>
  <div id="fb-root"></div>
  <script>
    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 = "//connect.facebook.net/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));
  </script>
  <div class="fb-login-button" data-scope="email,user_checkins">
    Login with Facebook
  </div>
</body>

edit- more information

edit2- my code

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:42:48+00:00Added an answer on May 27, 2026 at 9:42 pm

    Just after the init of your Facebook object, you can “subscribe” to events, like saying “when my user is just logged in, i want to do that…”
    For further informations about that, you can look to this topic !

    But what you really need is, i think, to use the FB.api to call for specific informations about the user. Once he’s logged in you can call this function like this :

    FB.api('/me', function(response) {
      alert(response.name);
    });
    

    You make a call to retrieve information about /me (= the current logged in user), then you have your callback function which you can use to send your data with an AJAX call or anything else to some server script that will store it to your Database, but you know how to do this part I think 🙂

    For more informations sabout the FB.api your should check this documentation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep on receiving this error message. I followed the instructions but it seems
I keep getting the same error when I try to set an attribute but
I keep getting this error Object reference not set to an instance of an
I keep getting this error 1Resource interpreted as Script but transferred with MIME type
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting tasks that are above my skill level. How can I address this without coming accross as grossly incompetent?
I keep on getting a syntax error in this HTML/JavaScript code and I can't
I keep studying this flow of the Facebook's bigpipe technique but I have this
I keep getting this error mesage when trying to add a breakpoint in gdb.
I keep getting a compilier error whenever I run this... I am quite sure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.