Design Snack Adds “Like” Buttons to Items and Blog Posts

Posted Thursday, April 22nd, 2010 in Updates
Design Snack Adds “Like” Buttons to Items and Blog Posts

After Facebook announced their new “Like” button API, we immediately went to work and got them integrated into blog posts and item detail pages. You can now “Like” gallery items and blog posts right from Design Snack! The integration was extremely easy, too.

STEP ONE: Add the following Facebook SDK (http://developers.facebook.com/docs/reference/javascript/) to your footer (above the closing body tag):

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

STEP TWO: Use Facebook’s button tool to create your own Like button: http://developers.facebook.com/docs/reference/plugins/like

It’s that easy! I personally can’t wait for these to start popping up all over, it’s a much quicker way to share something and it feels more intuitive.

One Response to “Design Snack Adds “Like” Buttons to Items and Blog Posts”

  1. Kelvin says:

    It is really a great news that Like buttons can be added to items and blog post. It is really a quicker way of sharing…………… .Thanks for sharing.

Leave a Reply