views:

134

answers:

1

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?

+2  A: 
Anurag
thanks a lot =)
Garrett