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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:08:13+00:00 2026-05-15T22:08:13+00:00

i have copied this code from the FB.init documentation : <script src=http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US type=text/javascript></script> …

  • 0

i have copied this code from the FB.init documentation:

    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>

...
     <!-- facebook JS SDK init -->
            <div id="fb-root"></div>
            <script>
                window.fbAsyncInit = function() {
                    FB.init(
                    {
                        appId: '<?= FacebookHelper::FACEBOOK_APP_ID ?>',
                        status: true,
                        cookie: true,
                        xfbml: true
                    });
                };

                (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>

i placed it just before my </body> tag (as they recommend in the documentation), but i am getting this weird error (i can see via firebug):

b is undefined
[Break on this error] if(!window.FB)FB={};FB.forEach=functio...B.TypeLoader.subclass,FB.TypeLoader); 

now, at first, i thought this must be a bug with my code, but the more i think about it, the more i remember hearing about some problems between firebug and facebook javascript. is that the problem, or am i forgetting something?

  • 1 1 Answer
  • 1 View
  • 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-15T22:08:13+00:00Added an answer on May 15, 2026 at 10:08 pm

    I think it is because you are including the older version of Facebook Connect. You don’t need to include it with the newer JS SDK:

    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>
    

    Also, Facebook recommends placing the asynchronous loading code right after the opening body tag, such as (but it’s your call):

    <body>
        <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>
        ...
        ...
    </body>
    

    Firebug doesn’t seem to be the issue here.

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

Sidebar

Related Questions

I have just copied Key-Listener code from http://java.sun.com/docs/books/tutorial/uiswing/examples/events/KeyEventDemoProject/src/events/KeyEventDemo.java . I was able to compalie
I have this sample code for async operations (copied from the interwebs) public class
I have just compiled this code: http://www.win32developer.com/tutorial/winsock/winsock_tutorial_2.shtm I have added some codes so it
This is something I don't understand. Look at this method (copied from http://blog.blackwhale.at/2009/07/uibutton-in-uitableview-footer/ )
I copied this code from another post. I tried the example, however, I am
I've just been experimenting with MPI, and copied and ran this code, taken from
I have copied this question here from spring forum . I have a parent
I have copied the C# code from Photobucket api and i am editing as
why do I get this exception?please suggest any solutions.i have properly copied mail.jar and
I have copied some files from project A to project B, both of which

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.