Search code examples
facebookfacebook-likefacebook-opengraph

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>

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.


Solution

  • 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>