其实问题在于页面使用不同的脚本来加载FBConnect模块。
在http://www.thegreekmerchant.com/:
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '146943825373452',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true,
logging: '0'
});
jQuery(document).trigger('fb:init');
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net//all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
http://www.thegreekmerchant.com/product/fokofpolisiekar/band-logo上有两个脚本,前一个和后一个:
<div id="fb-root"></div><script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId: "146943825373452",
status: true,
cookie: true,
xfbml: true
});
FB.Event.subscribe("edge.create", function(href, widget) {
_gaq.push(["_trackEvent", "Facebook like", "Drupal", href]);
});
};
(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>
我已经用第二个脚本替换了第一个脚本,http://www.thegreekmerchant.com/ 现在可以工作了(当然不是尖锐的版本,而是在我的沙盒服务器上)。您只需要http://www.thegreekmerchant.com/product/fokofpolisiekar/band-logo 上的第二个脚本。