Request coming back as "Unauthorized", even when there's permisson.

0 views
Skip to first unread message

A. Chapin

unread,
Mar 28, 2008, 2:16:59 PM3/28/08
to OpenSocial - OpenSocial Application Development, api.k...@google.com
Hello!

I'm having difficulty updating a user's Application Data. With this
code:

var request = opensocial.newDataRequest();
if(opensocial.hasPermission(opensocial.Permission.VIEWER))
{
request.add(request.newUpdatePersonAppDataRequest(opensocial.DataRequest.PersonId.VIEWER,"key",data));
request.send(callback);
}else{
opensocial.requestPermission(opensocial.Permission.VIEWER, "Sorry to
bug you, but your confirmation is required to allow Hangman to save
your guess data. If you don't grant this permission, you won't be able
to play the game!", checkForPermission);
}

I get the following in my response: "Error":"unauthorized", and it
doesn't drop ask for permissions. This is strange to me, since the
hasPermission call should only return true if an app data update is
possible. Does anyone have any insight as to why this could be
occurring? Thanks!

-A Chapin

Reply all
Reply to author
Forward
0 new messages