Hi,

Im having problems with this sample code.
Im only trying to get the Viewer's name.
I tested it on the sandbox logged as the OWNER of the app and it was
OK.
But when Im not the OWNER (trying to run the app as a OWNER friend) I
get no return.
If I change the the "opensocial.DataRequest.PersonId.VIEWER" to
"opensocial.DataRequest.PersonId.OWNER",
then i get the OWNER's name. But i WANT the viewer's name.

Can someone help me?
thanks

 /**
  * Request VIEWER name.
  */
  function getData() {
    var req = opensocial.newDataRequest();
    req.add(req.newFetchPersonRequest
(opensocial.DataRequest.PersonId.VIEWER, 'viewer');
    req.send(onLoad);
  };

  function onLoad(dataResponse) {
    var viewer = dataResponse.get('viewer').getData();
    var html = 'Viewer name: ' + viewer.getDisplayName();
    document.getElementById('dom_handle').innerHTML = html;
  };

--~--~---------~--~----~------------~-------~--~----~
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 
opensocial-orkut+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to