Following all of the examples, I'm receiving the following error
message: "unauthorized: The currently logged in user can only fetch
app data for people in the current app."

Any help with either what I'm doing wrong or if the sandbox is
behaving badly would be greatly appreciated.

Here's the relevant code:
--- Storing the Data ---
  var req = opensocial.newDataRequest();
  var myFeatures = new Array();

 ... filling in the myFeatures array ...

  req.add(req.newUpdatePersonAppDataRequest
(opensocial.IdSpec.PersonId.VIEWER, 'myFeatures',
gadgets.json.stringify(myFeatures)));
  req.send();

--- Retrieving the data ---
  var req = opensocial.newDataRequest();
  var myFeatures = new Array;
//  var idspec = opensocial.newIdSpec({"userId": 'VIEWER', "groupId":
'SELF'});
  var idspec = opensocial.newIdSpec({"userId": 'VIEWER'});

  req.add(req.newFetchPersonAppDataRequest(idspec, "myFeatures"),
"data");

  req.send(function (resp) {
    var dataResp = resp.get("data");

    if (dataResp.hadError()) {
      GCAPP.error = "Unable to retrieve myFeatures: " +
dataResp.getErrorMessage();
    }
    else {
...
    }
  });

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle 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/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to