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 6337605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:16:58+00:00 2026-05-24T19:16:58+00:00

Here I am using Facebook Login button plugin and javascript sdk I am able

  • 0

Here I am using Facebook Login button plugin and javascript sdk

I am able to successfully login and logout by using above.

When a first time user has gone through authentication process I need to store user basic information i.e. Facebook login name, email in my database.

Please suggest how I can do this.

<p><fb:login-button autologoutlink="true"></fb:login-button></p>


    <div id="fb-root"></div>
    <script>
        window.fbAsyncInit = function () {
            FB.init({ appId: '123456', status: true, cookie: true,
                xfbml: true
            });
        };


        (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);
        } ());
    </script>
  • 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-24T19:16:59+00:00Added an answer on May 24, 2026 at 7:16 pm

    Subscribe to the event auth.login. If you do this, Facebook will call your handler after a login as happened.

    In that handler, use FB.api to call the Graph API to get any information you desire. For example calling /me as shown in the second example will get you basic information about the logged in user.

    Now you have all the data in JavaScript. To send that up to your server, do a plain old XMLHttpRequest/AJAX request. Your JavaScript library probably makes this easy — in jQuery this is jQuery.ajax() — but worst case you can use XHR directly.

    Now you have the data on your server and you can do whatever you want, like store it in the database. If you only want to store the data once, just check that you haven’t already stored info about that user ID yet.

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

Sidebar

Related Questions

Can you recommend a library/SDK which allows me to quickly integrate Facebook Login (using
I call a javascript function from a textbox by using OnKeyPress=clickSearchButton() Here is my
Ok so I am trying create a login script, here I am using PHP5
I'm using the Facebook iPhone SDK . All I'm trying to do is display
I'm using DotNetOpenAuth to sign in to Facebook . Here is the code: var
I'm trying to switch over to the new Facebook JavaScript SDK from the old
I'm using Facebook C# SDK and got a sample on how to set up
Possible Duplicate: XFBML and the Facebook Login button I'm trying to add the Login
So when I use Facebook's PHP SDK 3.0.1, using their example.php (you can find
I'm using Facebook Graph API on Google App Engine. I was able to fetch

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.