My favorites | English | Sign in

Faster apps faster - GWT 2.0 with Speed Tracer New!

orkut Developer Home

Chat Gadgets in orkut

Overview

Chat gadgets provide a way for users to interact in realtime using more than just text. This feature allows orkut users to share a simple gadget—such as a game or collaborative tool—with their friends. The application will be rendered in a chat window that appears in the lower-right-hand side of the screen.

These applications are implemented as gadgets. We support the Realtime Gadgets API to allow realtime updating between gadgets on different users' machines.

Writing chat gadgets

Chat gadgets are gadgets that support the Realtime Gadgets API. To get started writing chat gadgets:

  1. Learn about the gadgets.* API.
  2. Learn how to use the gadgets.sharedstate API to communicate between two gadgets in real time.
  3. Test your gadget on the orkut sandbox or the Talk test harness. The Talk test harness allows you to run two instances of your gadget side-by-side so you don't need two browsers open.

Sample applications are provided in the Realtime Gadgets API documentation.

Caja

On the public orkut site (not the sandbox) we will enforce that gadgets use the Caja feature. Caja rewrites your JavaScript code to be safer to embed on other sites and protects sites that embed gadgets from various attacks. Since Caja rewrites your javascript, it's important that you test your gadget with Caja enabled to ensure that the rewriting doesn't break your gadget. You can test your gadget's interaction with Caja by adding the following line to your ModulePrefs element:

<Require feature="caja"/>

Using chat gadgets on the orkut sandbox

Currently, chat gadgets are only supported in the orkut sandbox.

To initiate a gadget during a chat, select Actions > Send Application and enter the URL of the gadget to send. There are some sample applications listed in the Realtime Gadgets API documentation.

Once you've sent or received a gadget, it will be shown in a list above the text entry field.

Sharing your gadgets with your friends

When we enable chat gadgets on the main orkut site, users will see only the gadget list; on the non-sandbox site, there will be no text entry field to enter arbitrary gadget URLs. However, non-sandbox users can receive arbitrary gadgets, so as a developer with access to the sandbox you can send any gadgets to your friends. Once your friends have received these gadgets, the gadgets will show up in your friends' list of gadgets and can be sent on to other friends.

Further, we are working on a gadget directory for developers to showcase their gadgets and to allow users to install these gadgets to their default list, which we'll allow to grow beyond three entries.

Chat gadgets and OpenSocial

We're planning to add support for social APIs like access to people and activities in the chat container. We're also planning to support for the gadgets.sharedstate API to the canvas page.