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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:15:09+00:00 2026-05-25T12:15:09+00:00

I have this facebook js api code and it was working till a day

  • 0

I have this facebook js api code and it was working till a day back …
and now it has suddenly stopped working ..
im using it for a collage project and its possible my partner may have fiddled with it but i cant seem to find anything wrong with it …

<div id="fb-root"></div>
  <script src="http://connect.facebook.net/en_US/all.js"></script>
  <script type="text/javascript" >
     var access_token;
     FB.init({ 
        appId:'XYZ', 
        cookie:true, 
        status:true, 
        xfbml:true 
     });

     FB.Event.subscribe('auth.login', function(response) {
                                login_event();
            });

    function login_event(){
        FB.api("/me",function(user){
            var request = new XMLHttpRequest();
            request.onreadystatechange=function(){
            uid = user.id;
            if(request.readyState==4 && request.status==200){
                    $("#middle").load("login_manager.php?uid="+uid);
                }
            }
            request.open("GET", "sessions.php?uid="+uid, true);
            request.send();  

        })
    }

    if(navigator.appCodeName=="Mozilla"){

        FB.getLoginStatus(function(response) {

            document.getElementById("middle").innerHTML = "<img src=\"../images/loading-round2.gif\">";
            if (response.session) {
                access_token = response.session.access_token;   
                FB.api('/me', function(user) {  
                   if (user!=null) {
                    var uid = user.id;
                    var request = new XMLHttpRequest();
                    request.open("GET", "sessions.php?uid="+uid, true);
                    request.send();           
                    request.onreadystatechange=function(){
                        if(request.readyState==4 && request.status==200){
                                $("#middle").load("login_manager.php");
                                }
                            }
                        }
                    });
                }
                else{
                    document.getElementById("middle").innerHTML = '<fb:login-button perms="email,user_checkins,offline_access,publish_stream">Login with Facebook</fb:login-button>';
                    FB.XFBML.parse(document.getElementById('middle'));
                }             
            });

        }



    </script>

it does’nt seem to be entering the getLoginStatus() function

  • 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-25T12:15:09+00:00Added an answer on May 25, 2026 at 12:15 pm

    It has started working again ..
    It was a problem at facebook’s end

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

Sidebar

Related Questions

Using the Graph Facebook API with this code [facebook requestWithGraphPath:@me/friends andDelegate:self]; Now I have
I am using face book API and i have this below code: include(../src/facebook.php); //
I have this code that can't send a Facebook request until now. NSDictionary *firstDict
Starting from this very nice article about doing facebook integration using the javascript API
I am using the Facebook-c-sharp to upload photos to Facebook. This code works fine
I hope this is allowed but I have a number of questions regarding Facebook
I have this code in jQuery, that I want to reimplement with the prototype
I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the
I've integrated my website with Facebook Connect, authorization/single-sign on all working great. Now im
I am trying to get my status from facebook using the javascript api. I

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.