February 16, 2009

Preliminary AppData implementation

Preliminary AppData implementation is completed and tested. You can update and fetch AppData. Escape character is not yet supported.

To update app data


var dr:DataRequest = container.newDataRequest();
dr.add(dr.newUpdatePersonAppDataRequest("VIEWER", "testdatakey1", "testdata1"));
dr.send(updatePersonAppDataCallback);


To fetch app data


var dr:DataRequest = container.newDataRequest();
var idSpecParam:Object = {};
idSpecParam[com.nextgenapp.opensocial.IdSpec.Field.USER_ID] = "VIEWER";
var idSpec:IdSpec = container.newIdSpec(idSpecParam);
dr.add(dr.newFetchPersonAppDataRequest(idSpec, ["testdatakey1"], null));
dr.send(updatePersonAppDataCallback);


The usage of the api is exactly the same as the opensocial javascript api.

If you have any questions about usage of these 2 functions or you feel the interface method is that the best, please send your suggestions to us.

No comments:

Post a Comment