Facebook Extends FBML with Custom Tags, Enabling a New Class of FBML Widgets

facebook platform developersSince the Facebook Platform launched in 2007, FBML tags have always been created and defined by Facebook. However, in an effort to make the Facebook Platform more extensible, today Facebook is announcing that developers can now create custom FBML tags to widgetize their content or functionality for other developers to use.

With custom tags, any developer can create new FBML tags. These custom tags can be used just in their own applications, or they can be shared with other Facebook developers as “widgets.” For example, developers who have interesting access to content or functionality could now use custom FBML tags to extend their apps’ reach to any Facebook application, increasing their distribution. That could mean new partnerships and revenue opportunities.

ilikewidget

Facebook worked with a few app developers to test the new feature. Here are a few examples of early widget implementations built with custom tags:

The project was led by Facebook engineer Yariv Sadan, who initially started it as a side project when he saw the ways developers could extend FBML to make it more powerful.

“We’ve seen so much great content created by application developers, and many developers want to collaborate with each other,” Josh Elman, Facebook Platform Program Manager told Inside Facebook. “Custom tags enable more sharing between the Facebook developer community.”

Elman said that although Facebook plans to make widgets built with custom tags functional for any websites which have enabled Facebook Connect in the future via XFBML, only applications that run inside Facebook will be able to use custom tags for now. In addition, Elman said that Facebook’s same policies and monetization rules apply.

Finally, Facebook says that another benefit of using custom tags are their potential to improve application performance:

Much like how one FBML tag is a shorthand way to include a lot of markup (think of fb:comments, for example), one custom tag can replace a lot of FBML and HTML content inline. Using custom tags in this way lowers the communication overhead between Facebook and your application’s servers. One custom tag can render a larger amount of content. Instead of sending the full FBML fragment with every request, you can replace it with a custom tag that Facebook will expand when Facebook parses the page.

Developers interested in checking out the custom tags created by other developers can use the custom tags directory on the Developer wiki. Facebook requests that if you’ve created new public tags, “Please let the community know by adding their documentation to this wiki article.”

More information is available on the Developer wiki.