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

  • Home
  • SEARCH
  • 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 8031185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:00:41+00:00 2026-06-05T01:00:41+00:00

I got a Problem with the Facebook Login on my Website. The Code Below

  • 0

I got a Problem with the Facebook Login on my Website. The Code Below is my FB-Connect Code. The commented part of the code sign’s me in to my Website. My Problem is when i “reactivate” this code it logs me in instandly everytime i visit the page. But i want to log the user in when he clicks the “Login with Facebook”-Button. When I clicks the facebook login button a Popup shows up and nothing happens..

Can i somehow call a JS function when i click the FB-Connect button?

              <script>
                    window.fbAsyncInit = function() {
                      FB.init({
                        appId      : 'xxxxxxxxxxxxxxxxxx', // App ID
                        status     : true, 
                        cookie     : true,
                        xfbml      : true,
                        oauth      : true,
                      });   
            var login = false;

                 FB.getLoginStatus(function(response) {
                          if (response.status === 'connected') {
                              console.log('connected');
                              login=true;

                                var uid = response.authResponse.userID;

            //this part of the code below redircts me to the part, where i login to my system.
                                /*var accessToken = response.authResponse.accessToken;
                                $.ajax({
                                    type: 'POST',
                                    url: '/?eID=login',
                                    data: $(this).serialize(),
                                    success: function(msg) { 
            alert("LOGIN");
                                $('#content').load('/live-session/tickets/');

                        }
                    });*/
                }});
  • 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-05T01:00:43+00:00Added an answer on June 5, 2026 at 1:00 am

    You need to use FB.login function on click on fb connect button and don’t use FB.getLoginStatus

     FB.login(function(response) {
       if (response.authResponse) {
         console.log('Welcome!  Fetching your information.... ');
         FB.api('/me', function(response) {
           console.log('Good to see you, ' + response.name + '.');
         });
       } else {
         console.log('User cancelled login or did not fully authorize.');
       }
     });
    

    From Doc

    FB.getLoginStatus allows you to determine if a user is logged in to
    Facebook and has authenticated your app.

    So, if you don’t want to check whether user has logged in on page load, don’t call this

    When I clicks the facebook login button a Popup shows up and nothing happens..

    If you had already authorized the app and authenticated, facebook wont ask you again for login and authorization

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

Sidebar

Related Questions

I got a Facebook php sdk Retrieve friendlist problem. Here is my basic code...
I got a Problem with the Facebook Login on my page. First I tried
i got problem with my code and hopefully someone able to figure it out.
I want to ask about strcpy. I got problem here. Here is my code:
I am trying to implement Facebook Connect functionality into a website that I am
I'm building a Flash-based (AS3) website that incorporates Facebook Connect through a combination of
I had problem when tried to implement Facebook Credit into my website.. First step
I want to add share this on Facebook to a page. I've got this
My goal is to use Facebook Login on a website with as few api
I've got a CodeIgniter project using the Facebook Connect official PHP implementation. For the

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.