Welcome, guest Sign In

Differences Between the 0.7 and 0.8 JavaScript APIs

This section describes some of the important differences between versions 0.7 and 0.8 of the OpenSocial JavaScript APIs. For more information, see the OpenSocial Release Notes for v0.8.

Using opensocial.IdSpec

When making some data requests, such as Activity, People, and newFetchPersonAppDataRequest, you must use an IdSpec object instead of specifying opensocial.IdSpec.PersonId by itself.

Change the following 0.7 code:

To the following 0.8 code:

When NOT to Use opensocial.IdSpec

The newFetchPersonRequest method requires a string ID as the first argument, not an opensocial.IdSpec object. The newUpdatePersonAppDataRequest and newRemovePersonAppDataRequest methods have the same requirement. Specifying opensocial.IdSpec as the first argument results in an error. Therefore, code such as the following is correct and does not need to be changed for 0.8:

Retrieving Friends With NETWORK_DISTANCE

Because DataRequest.Group has been removed from 0.8, VIEWER_FRIENDS and OWNER_FRIENDS are no longer available. Therefore, in 0.8 you must use IdSpec.Field.NETWORK_DISTANCE instead of DataRequest.Group.

Change the following 0.7 code:

To the following 0.8 code:

Activity Response Format

In 0.7, Activity request responses are wrapped in an object with the activities property set to the actual response. However, 0.8 does not have this wrapper and the response is returned directly.

Change the following 0.7 code:

To the following 0.8 code:

Table of Contents

Copyright © 2009 Yahoo! Inc. All rights reserved. Copyright | Privacy Policy

Help us continue to improve the Yahoo! Developer Network: Send Your Suggestions