Is this your entire snippet? Where are you calling onLoadFriends from? You should be able to use this snippet to get the IDs you need. Notice that I use the opensocial.Person getId method rather than using the URL parameters for this.
------------------------ function request() { var req = opensocial.newDataRequest(); req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER), "owner"); req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER), "viewer"); req.send(response); }; function response(data) { var owner = data.get('owner').getData(); var viewer = data.get('viewer').getData(); var ownerId = owner.getId(); var viewerId = viewer.getId(); ... }; Cheers! - Jason On Jul 4, 1:12 am, Dheeraj Verma <[EMAIL PROTECTED]> wrote: > I can not find viewer & owner id, whenever I visit to another profile. > > I am using this code: > > function onLoadFriends(data) > { > alert("onLoadFriends"); > > var viewer = data.get('viewer').getData(); > alert(viewer); > var vFriends=data.get('ViewerFriends').getData(); > alert(vFriends); > var vFriendsArr=vFriends.asArray(); > alert(vFriendsArr.length); > var viewerFriends = data.get('OwnerFriends').getData(); > var owner=data1.get('owner').getData(); > var frind=viewerFriends.asArray(); > thumb= owner.getField(opensocial.Person.Field.THUMBNAIL_URL); > profile= owner.getField(opensocial.Person.Field.PROFILE_URL); > glob_friends=frind; > var myc_owner_id=gadgets.util.getUrlParameters()["gadgetOwner"]; > if(gadgets.util.getUrlParameters()["gadgetViewer"]=="") > { > alert("blank"); > myc_viewer_id=1; > > } > > Please help me. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---