开发者

How to get open graph Facebook Like buttons to show?

I have implemented Facebook Open Graph Protocol Full Integration following the Facebook developers site and here http://www.websitedesign411.com/blog/facebook-open-graph-protocol-full-integration-walkthrough.

I got the Facebook Like Buttons to show here http://giantmango.com/news using

<fb:like href="<?php the_permalink() ?>" layout="button_count" show_faces="false" width="200" action="like" colorscheme="light"></fb:like>
开发者_JAVA技巧

On the same domain, I am using the exact code, but on a different theme and the Facebook Like Buttons are not showing here http://giantmango.com/testartwork-2237

Any ideas on how to solve this problem would help very much.


It looks like you are missing your Facebook javascript initialization code.

<div id="fb-root"></div>
<script>
    window.fbAsyncInit = function() {
    FB.init({appId: 'your app id', status: true, cookie: true,
        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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜