Back to News for Developers

New Like Button Features Mean More Opportunities for Liking

September 9, 2010ByJerry Cain

Since we launched social plugins in April, we’ve been listening to user feedback and working with developers to optimize the Like button to make it as seamless as possible for people to like content around the web and share it with their friends.

Today, we’re officially launching three new updates for the Like button:

  • The ability to like canvas URLs for Facebook applications that represent things such as a cause, movie, or any other real world object
  • The ability to link a Like button to a Facebook Page
  • “Box count” layout that displays the total number of likes above the button

Enabling the Like button for canvas URLs on Facebook
Based on feedback from the developer community, we’re making it possible to like content within an application on Facebook. Now your users can like pages within your application just as they’ve been doing with Facebook Pages, and other pages on the web.

The resulting News Feed story will link directly back to the application, giving users more opportunities for liking content on Facebook.

To implement this feature, add Open Graph protocol<meta> tags in the <head> of the IFramed page or the canvas endpoint. Your canvas application’s ID will be automatically added as the fb:app_id. The og:url automatically points to your URL, and the og:site_name will be filled in as your application’s name.

For example, if you’re interested in gaining distribution for content or giving users the ability to like a virtual good, add the following pieces of the Open Graph protocol:

  • og:title - The title of your object
  • og:image - An image URL which should represent your object. The image must be at least 50px by 50px and have a maximum aspect ratio of 3:1.

If you have a real-world object that expects to publish updates to users (e.g., a cause, movie, product), include the og:type tag with the appropriate type. You can verify that the Open Graph tags have been entered correctly by using the URL Linter.

Enabling the Like button for Facebook Pages
We’ve also made it possible for the Like button to link to Facebook Pages. Page owners now have the option of either using the Like button or Like Box to generate connections. Simply enter the Facebook Page URL into the configurator.

Displaying Number of Likes with New “box count” Layout
We’ve added another layout option that shows the total number of likes above the button. Simply include layout=“box_count” to get this button and your website visitors will have an easy view into how popular a piece of content is. Use the configurator and select the "box count" layout style.

This layout provides another option to suit different website designs. To determine which Like button is most effective at driving referral traffic for your site, use our ref attribute for tracking.

We’re continuing to develop features for the Like button and look forward to your comments in the Forum.

Jerry, an engineer on Facebook Platform, is looking forward to seeing what his friends like in their applications on Facebook.