I have been developing an openSocial gadget in the igoogle sandbox.
Because I have had several versions of the gadget, I have loaded them
with different urls. (e.g. http://www.example.com/gadget1.php,
http://www.example.com/gadget2.php, http://www.example.com/gadget3.php...)
(they are php pages which yield an xml gadget).
The problem seemed to come about when I got to about the fifth version
of the gadget. When loading this gadget, the opensocial request will
fail. The request is this (basically identical to that from the
openSocial tutorial)
req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("VIEWER"), 'viewer');
var viewerFriends = opensocial.newIdSpec({ "userId" :
"VIEWER", "groupId" : "FRIENDS" });
var opt_params = {};
opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] =
100;
req.add(req.newFetchPeopleRequest(viewerFriends, opt_params),
'viewerFriends');
var viewer = opensocial.newIdSpec({ "userId" : "VIEWER" });
req.add(req.newFetchPersonAppDataRequest(viewer, ['recs',
'viewed_recs']), 'data');
req.add(req.newFetchPersonAppDataRequest(viewerFriends,
'recs', opt_params), 'viewerFriendData');
req.send(callbackFunction);
In the original gadgets, this request comes back fine, but in newer
versions, I get the error message "The currently logged in user and/or
the gadget request data, does not have access to person data".
Now, if I copy this gadget to an older url, the request is fine, but
the exact same code in a different url will yield the above error
message.
Is it a problem to develop with multiple urls for similar gadgets? Is
it the url of the gadget that causes the error? It is the only
difference between the requests that fail and those that succeed.
Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---