Right, more information, more detail. See the code below for the simple application, 'friends', slightly altered version of the Google demo code, altered to display more 'viewer' information.
If I install this application in user A's profile, and view it as user A (this is all 0.7 and sandbox.orkut.com), it works fine - great. If, as user B, who is then a friend of user B, I view the application *on user A's profile*, the application does absolutely nothing. Now with my understanding of viewers and owners - surely, it should? It should display details about user B shouldn't it? Because user A is then a viewer no? ----------------------- Code starts ----------------------- ----------------------- ----------------------- <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="List Friends Example"> <Require feature="opensocial-0.7"/> </ModulePrefs> <Content type="html"> <![CDATA[ <script type="text/javascript"> /** * Request for friend information. */ function getData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER), 'viewer'); req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS), 'viewerFriends'); req.send(onLoadFriends); }; /** * Parses the response to the friend information request and generates * html to list the friends along with their display name. * * @param {Object} dataResponse Friend information that was requested. */ function onLoadFriends(dataResponse) { var viewer = dataResponse.get('viewer').getData(); var html = 'Viewer display name ' + viewer.getDisplayName(); html += ':<br><ul>'; html += '</ul>'; html += '<p>viewer.getId: '+ viewer.getId() + '</p>'; html += '<p>opensocial.Person.Field.NAME: '+ viewer.getField(opensocial.Person.Field.NAME) + '</p>'; html += '<p>opensocial.Person.Field.PROFILE_URL: '+ viewer.getField(opensocial.Person.Field.PROFILE_URL) + '</p>'; html += '<p>opensocial.Person.Field.THUMBNAIL_URL: '+ viewer.getField(opensocial.Person.Field.THUMBNAIL_URL) + '</p>'; alert(html); document.getElementById('message').innerHTML = html; }; gadgets.util.registerOnLoadHandler(getData); </script> <div id="message"> </div> ]]> </Content> </Module> ----------------------- Code ends ----------------------- ----------------------- ----------------------- On Oct 6, 5:49 pm, rd-london <[EMAIL PROTECTED]> wrote: > Hi, > Wonder if anyone can help. > > I have an 0.7 OpenSocial appln that is currently successfully > performing a signed makeRequest, and for the application owner is > returning the following all fine: > > viewer.getId(); > viewer.getDisplayName(); > viewer.getField(opensocial.Person.Field.NAME); > viewer.getField(opensocial.Person.Field.PROFILE_URL); > viewer.getField(opensocial.Person.Field.THUMBNAIL_URL); > > However, when someone who is a friend of the owner uses the > application (and where the friend does *not* install the application), > the output of getId() is zero, and the others are all empty. So it > doesn't seem to work for a 'viewer'. What's very peculiar though is > that the raw GET data sent by the signed makeRequest call contains > what seems to be a valid "opensocial_viewer_id":"______" (did contain > a sensible value). > > This is all in the Sandbox. Can't use 0.8 as this also needs to run on > other containers that only use 0.7. > > Anyone any help with this? > > Many thanks, > R --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---