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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:21:17+00:00 2026-06-09T12:21:17+00:00

I was looking at logging all the users that entered the website using FB

  • 0

I was looking at logging all the users that entered the website using FB .with the help of purushotam ( see my other question) was able to proceed.

here are my new issues:
1) how can I get/use the facebook provided button. Reason is I want user to get the same user experience. (facebook button bluish button)
2) once the user logs in than , I want to send a alert and than go to the website I re-directed (in example I have stackoverflow). Because FB is non blocking asynchronous, I see before the FB returns the value the website is getting redirected. how to resolve this issue.
3) When a user tries to login I dont want the FB popup- I want to have the FB login in a new page (just like stackoverflow login) how can I do that ..

  <body>
        <div id="fb-root"></div>
<script>

      window.fbAsyncInit = function() {
          FB.init({appId: 'xxxx', status: true, cookie: true, xfbml: true});

      };
      (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol +
          '//connect.facebook.net/en_US/all.js';
        document.getElementById('fb-root').appendChild(e);
      }());

    function fetchUserDetail()
    {
        FB.api('/me', function(response) {
                alert("Name: "+ response.name + "\nFirst name: "+ response.first_name + "ID: "+response.id);
            });
        window.location.href = 'http://www.stackoverflow.com';  
    }

    function checkFacebookLogin() 
    {
        FB.getLoginStatus(function(response) {
          if (response.status === 'connected') {
            fetchUserDetail();
          } 
          else 
          {
            initiateFBLogin();
          }
         });
    }

    function initiateFBLogin()
    {
        FB.login(function(response) {
           fetchUserDetail();
         });
    }
    </script>


 <input type="button" value="Sign in using Facebook" onclick="checkFacebookLogin();"/>


</body>
  • 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-06-09T12:21:18+00:00Added an answer on June 9, 2026 at 12:21 pm

    1) how can I get/use the facebook provided button. Reason is I want user to get the same user experience. (facebook button bluish button)

    https://developers.facebook.com/docs/reference/plugins/login/,
    https://www.facebook.com/brandpermissions/logos.php

    2) once the user logs in than , I want to send a alert and than go to the website I re-directed (in example I have stackoverflow). Because FB is non blocking asynchronous, I see before the FB returns the value the website is getting redirected. how to resolve this issue.

    Sorry, I don’t really get what you’re asking here. Please try to be more specific.

    3) When a user tries to login I dont want the FB popup- I want to have the FB login in a new page (just like stackoverflow login) how can I do that ..

    Don’t use FB.login then, but redirect the user to the URL of the Auth dialog; see https://developers.facebook.com/docs/authentication/client-side/#no-jssdk

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

Sidebar

Related Questions

I'm looking into using a javascript logging framework in my app. I quite like
I am looking into C# logging and I do not want my log messages
I'm looking a way to enable IP logging with log4net in ASP.NET. I found
i am looking for a php logging solution like log4net. do you know any
I'm looking for a way to centralise the logging concerns of distributed software (written
I were looking around for a way to Indent my logging statements. After a
I am looking for a simple solution to do Exception Logging combined with Error
I am looking for a .net class to deal with logging various information to
I am looking for a very simple method for logging application errors and certain
Looking at some assembly code for x86_64 on my Mac, I see the following

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.