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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:03:41+00:00 2026-05-23T12:03:41+00:00

At the top of my page I put this: <script type=text/javascript src=http://connect.facebook.net/en_US/all.js#xfbml=1></script> Then in

  • 0

At the top of my page I put this:

<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>

Then in the body I do this:

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

Then I have this later on in the page:

<fb:login-button perms="publish_stream">Connect with Facebook</fb:login-button>

And then in my JQuery document ready I have this:

FB.init({
        appId: '115************', cookie: true,
        status: true, xfbml: true
    });

In FF, everything loads fine, and when I click Connect with Facebook, everything works fine. In EVERY other browser, everything LOADS fine, but when I click Connect with Facebook, I get this error:

FB.login() called before calling
FB.init().

Any ideas?

P.S. Puttin the init() script in the head of the document doesn’t work either. Gives the same error.

P.P.S. Moving init() to the <head> makes it work for IE and FF now, but not Safari or Chrome.

  • 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-23T12:03:41+00:00Added an answer on May 23, 2026 at 12:03 pm

    One thing to consider is that <div id="fb-root"></div> should always be the last thing on the page, right before the closing </body> tag.

    Updated:

    Also, instead of calling FB.init() in your document.ready, do what Facebook documentation suggests and put it in the fbAsyncInit block:

    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({
          appId  : 'YOUR APP ID',
          status : true, // check login status
          cookie : true, // enable cookies to allow the server to access the session
          xfbml  : true  // parse XFBML
        });
      };
    
      (function() {
        var e = document.createElement('script');
        e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script embedded in a page, which is as follows: <script type=text/javascript>
<script type=text/javascript> window.onload = function() { document.getElementById('finalize_btn_top').onclick='bmlAuth();'; document.getElementById('finalize_btn_bottom').onclick='bmlAuth();'; } function bmlAuth(){ // } </script>
I add my page top link button like this: <a name=top></a> . . .
I have simplified my page and here what I have: <html> <head> <meta http-equiv=content-type
If you look at the source of this page http://kingston.talking-newspapers.co.uk/ you will see a
I'm using the Facebook Send button and I put the following on my page
The django-cms always uses the top-most page as the start/landing page. I now want
Hi I'm looking to have an alert banner at the top of page be
At the top of my page I have a div that spans the page,
At the top of my page I want to have the title of 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.