You are here: Docs Technical Documentation Distributing Widgets OpenSocial + Clearspring

OpenSocial + Clearspring

Beta Warning

The OpenSocial standard is still under active development, as are all the sites that support OpenSocial. The current version is 0.7 and APIs may change at any time. Most of the sites require a developer account, special preferences, registration, or some kind of disclaimer. We encourage you to start testing the new open social features, but have to warn you that behavior may vary from site to site. Be patient and we'll update you as features stabilize.

What is this OpenSocial URL?

All OpenSocial sites require a public URL that returns OpenSocial code. You can use the Clearspring URL to test your widget, or copy the xml to your own public server and use your own URL. Copy the OpenSocial URL into the “Add Application” text field to test a Social Application and submit the URL to OpenSocial galleries when you are ready to have other users test it.

What is the XML returned by the OpenSocial URL?

It is not part of the OpenSocial specification, but the reference implementations all use Google's Gadget Module as an open standard. Clearspring generates the minimum module file needed to include your widget code and OpenSocial libraries. OpenSocial enabled javascript widgets will be added as content to the OpenSocial gadget xml file so you only have to worry about the Application code, not its packaging. Flash widgets will also be included as content with Javascript access to the open social APIs. Direct Flash access to OpenSocial APIs will be added as soon as it is available. You can use this file to test OpenSocial sites or copy it as a start to your own OpenSocial Application. Clearspring will continue to maintain the OpenSocial URL and xml as the specification and libraries change.

What do I have to do to make my existing widgets work with OpenSocial?

Good news, they already work! All Clearspring widgets are already OpenSocial enabled. Get a test account at your preferred OpenSocial site and you can add your widget as an OpenSocial Application using the OpenSocial URL. If you want to develop new social features for your widget, see the development tutorial and we'll get you started.

How do I develop OpenSocial Applications?

The OpenSocial specification defines a set of Javascript requests for retrieving Person, Activity, and Application data from an OpenSocial network. To add friend lists, shared comments, or messages from business associates to your OpenSocial application you need to need to write Javascript methods to handle the requests, parse your application data, and build a user interface. The user interface may also be written in Flash with external calls to the Javascript data.

  1. Once you familiarize yourself with the OpenSocial documentation you can write a Javascript OpenSocial Application. Make sure to add code to check for the presence of the OpenSocial container and provide the user with a non-social widget when the application is added to a blog or start page that does not yet support OpenSocial. Host the Javascript file on your own public server so it can be accessed by anyone.
  2. Create a Javascript widget in your Clearspring account.
  3. Check the “Enable Open Social” box.
  4. Add the OpenSocial URL from the publish page to a OpenSocial container and test your application.

Resources

Orkut Sandbox Example

Orkut provides a sandbox for OpenSocial testing within its existing network. Once you have been approved as a developer you can test applications with your developer account or submit applications to their test gallery.

  1. Create an Orkut account (http://orkut.com)
  2. Sign up for developer access (Usually takes 1 day)http://code.google.com/support/opensocialsignup/
  3. Once accepted you can log into http://sandbox.orkut.com instead of the regular orkut.com. The sandbox will provide you with an “applications” link in the sidebar. If your account has not been granted access to the sandbox you will be redirected to orkut.com with no way to test OpenSocial applications.
  4. Click on the “applications link”. The “applications” link will take you to the "my applications page" where you can view, add, and remove applications.
  5. Add your OpenSocial URL to the “Add Application by URL” field and click “add application”
  6. You can now see you Application name listed as a link in the sidebar. Click the application link to view your Application in the canvas page or visit your profile page to see the application running in the profile view.

Resources

Other Open Social Containers

  1. http://blog.ning.com/2007/10/open_social_ning_coming_early.html
  2. http://groups.google.com/group/opensocial-ning/topics
  3. http://www.hi5networks.com/developer/
  4. http://groups.google.com/group/opensocial-hi5/topics
  5. http://blog.plaxo.com/archives/2007/11/opensocial_is_n.html
  6. http://pulse.plaxo.com