O'Reilly logo

Programming Social Applications by Jonathan LeBlanc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Gadget Specification

Our first task, much like with any other gadget, is to implement the XML gadget wrapper for the application markup and content:

<?xml version="1.0" encoding="utf-8"?>
<Module>
   <ModulePrefs title="Chapter 5 rollup example"
                title_url="http://www.jcleblanc.com"
                description="Displays the profile information for the
                             current user and user friends"
                author="Jonathan LeBlanc">
      <Require feature="opensocial-0.9"/>
      <Require feature="osapi" />
   </ModulePrefs>

We add in the gadget metadata for author, description, title, and the associated title URL. In this gadget, we will be using the OpenSocial lightweight JavaScript library osapi and will not need any other libraries along with this feature. To include osapi, we add in two Require nodes—one for OpenSocial 0.9, which is the lowest OpenSocial version needed for osapi, and one for the osapi library itself.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required