You're on the right track. However, in orkut, you must specify a
person ID in order to retrieve the data for a particular user:
var data = response.get('get_data').getData();
var owner = response.get('owner').getData();
var ownerData = data[owner.getId()];
OpenSocial's persistence API is covered in greater depth in a pair of
articles on http://code.google.com:
http://code.google.com/apis/opensocial/articles/datarequests/datarequests-0.7.html#fetchData
http://code.google.com/apis/opensocial/articles/persistence.html
Please let me know if this doesn't help. If not, please include the
code snippet you're using to update the app data and I'll attempt to
verify at this end. Thanks!
- Jason
On May 6, 1:55 pm, csharpsocial <[EMAIL PROTECTED]> wrote:
> Hi I am running this code to retrieve a value I have previously stored
> on the profile data
>
> var req = opensocial.newDataRequest();
> req.add(
> req.newFetchPersonAppDataRequest(
> opensocial.DataRequest.PersonId.OWNER,
> "myvar"),
> "get_data");
> req.send(endCheckRequestCode);
>
> function endCheckRequestCode(response)
> {
> if (response.get("get_data").hadError()) {
> output("the fetch failed ... insert code to handle the error");} else {
>
> var data = response.get("get_data").getData();
>
> }
> };
>
> So far so good as the same code works on Hi5 and i manage to retrieve
> the value there from the response body.
> On Orkut though the respnse body coming back is the following:
>
> while (true); &&&START&&&{"Responses":
> [{"key":"get_data"}],"Success":true} &&&END&&&
>
> Which looks a bit odd to me....
> Should the code be different on Orkut?
>
> Thanks in advance for your help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut Developer Forum" 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-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---