Hello,

Eiji and I found some mistakes at the sample code of the persistence
api in Developer's guide for v0.8.

http://code.google.com/apis/opensocial/docs/0.8/devguide.html

The point is the following:

Line 28:
req.send(handlePopulateMyAppData, "update_appdata");
Correct code is:
req.send(handlePopulateMyAppData);

Line 36:
htmlout += data.getError();
Correct code is:
htmlout += data.getErrorMessage();

Line 47:
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
"viewer");
Correct code is:
req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER),
"viewer");

Line 48:
req.add(req.newFetchPersonAppDataRequest("VIEWER", fields),
"viewer_data");
Correct code is:
var p = {};
p[opensocial.IdSpec.Field.USER_ID] =
opensocial.IdSpec.PersonId.VIEWER;
var idSpec = opensocial.newIdSpec(p);
req.add(req.newFetchPersonAppDataRequest(idSpec, fields),
"viewer_data");

Line 61:
htmlout += data.getError();
Correct code is:
htmlout += data.getErrorMessage();

We confirmed to execute the code successfully with hi5 by correcting
these. Can anyone correct the sample code in developer's guide?

Regards,
Yoichiro
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to