Facebook XFBML Like Button incompatible with FeatureLoader script?

Posted by retailevolved on Stack Overflow See other posts from Stack Overflow or by retailevolved
Published on 2010-04-26T20:31:30Z Indexed on 2010/04/26 20:33 UTC
Read the original article Hit count: 348

Filed under:
|

Facebook gurus,

I have been implementing the Facebook Like button for a number of clients lately. To enable the Like Button, the following script has to be run:

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

<script>
    window.fbAsyncInit = function() {
    FB.init({appId: '<?php echo Mage::helper("evlike")->getLikeConfig("ev_facebook_app_id") ?>',
         xfbml: true});
    };
    (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
    '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
    }());
</script>

It seems that this is incompatible with the following include:

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

It would make sense as I believe that the FeatureLoader performs an initialization. Is this official now? I would ask in official Facebook forums but I get an error every time I attempt to do so...

© Stack Overflow or respective owner

Related posts about facebook

Related posts about facebook-api