Hi, You need to pass param to the newFetchPeopleRequest stating you need detailed profile.
var params = {}; params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [ opensocial.Person.Field.ADDRESSES ]; req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS,params), 'viewerFriends'); Here is the complete code example below - function getData() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER), 'viewer'); var params = {}; params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [ opensocial.Person.Field.ADDRESSES ]; req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS,params), 'viewerFriends'); req.send(onLoadFriends); }; function onLoadFriends(dataResponse) { var viewer = dataResponse.get('viewer').getData(); var viewerFriends = dataResponse.get('viewerFriends').getData(); viewerFriends.each(function(person) { output("<b>"+person.getDisplayName()+"</b><br/>"); var data=person.getField(opensocial.Person.Field.ADDRESSES); if(data!=null) for(var i in data[0].fields_){ output(i+'='+data[0].fields_[i]+"<br/>"); } output("<hr/>"); }); }; getData(); Thanks, Rohit Google Developer Programs Meet OpenSocial developers irc://irc.freenode.net/opensocial On Tue, Jun 10, 2008 at 1:03 PM, beginner <[EMAIL PROTECTED]> wrote: > > Dear Group Member! > I am new to this group. I want to get the cities of my friends. I have > used this code: > > 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); > }; > > function onLoadFriends(dataResponse) { > var viewer = dataResponse.get('viewer').getData(); > var viewerFriends = dataResponse.get('viewerFriends').getData(); > viewerFriends.each(function(person) { > output(person.getField(opensocial.Person.Field.ADDRESSES)); > }); > }; > getData(); > > i have tested it in coderunner but it giving NULL. Is there anything i > am missing or there is no access to friends' address. If you have any > code to do this please try to help me. Please help i am in need. > > Thanks in advance. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---