Facebook like button into prestashop
I'm creating a module for Prestashop, that display facebook's Like button (and Twitter's Tweet it) under product, but the Facebook button is still not loading...
I get the following code into the page, is there something wrong?
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: '118323178240875', status: true, cookie: false, xfbml: true});
};
(function() {
var e = document.createEleme开发者_开发技巧nt('script'); e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<fb:like show_faces="false" width="450" action="recommend" font="verdana"></fb:like>
I already solved my issue. The problem was that I initialized XFBML twice in my page which cause problems...
I created special module just for XFBML initialization and other modules for displaying the Like button and Fan box
精彩评论