Hi,

I seem to be getting no object at all returned when i am trying to
access viewer information when accessing the data from inside the
response object. I am using code I have copied and pasted from the
examples. Here is the pertinant code.

function request() {
  var req = opensocial.newDataRequest();
  req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
  req.send(response);
}



function response(data) {
  var viewerItem = data.get("viewer");
  var viewer = viewerItem.getData();
  var name = viewer.getDisplayName();
  var thumb = viewer.getField(opensocial.Person.Field.THUMBNAIL_URL);
  var profile = viewer.getField(opensocial.Person.Field.PROFILE_URL);
  profile = 'http://sandbox.orkut.com' + profile;
  var html = '<img src="' + thumb + '"/>';
  html+='<a href="' + profile + '" target="_top">' + name + '</a>';
  document.getElementById('main').innerHTML = html;
}

The object referenced by 'viewerItem' is always undefined??? Can
anyone help??

many thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Discussion" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to