4 messages in com.googlegroups.opensocial-orkut[orkut-developer] Re: Can not find vi...| From | Sent On | Attachments |
|---|---|---|
| Dheeraj Verma | 04 Jul 2008 01:12 | |
| Jason | 07 Jul 2008 14:38 | |
| Jason | 31 Jul 2008 13:56 | |
| Jason | 31 Jul 2008 13:59 |
| Subject: | [orkut-developer] Re: Can not find viewer & owner id…..![]() |
|---|---|
| From: | Jason (apij...@google.com) |
| Date: | 07/31/2008 01:59:38 PM |
| List: | com.googlegroups.opensocial-orkut |
Just out of curiosity, which Firebug response are you referring to? Are you inspecting the data returned when the app first loads or after calling request()?
- Jason
On Jul 30, 12:37 pm, Leocadio <leoc...@gmail.com> wrote:
Jason, I used your snippet, but I think OpenSocial is giving me a wrong ownerId.
When I ask for ownerId at my sandbox.orkut.com, it returns me 11482928505352212000, but when I look at Firebug's response, it shows me that my "Id":"11482928505352212653", i.e., the last three numbers of the ID are stripped and the id is filled with zeros!
Anyone can help me with this trouble? Cheers!
On Jul 7, 6:38 pm, Jason <apij...@google.com> wrote:
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) { varowner= 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 <dhee...@gmail.com> wrote:
I can not find viewer &ownerid, 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(); varowner=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 open...@googlegroups.com
To unsubscribe from this group, send email to
opensocial-orkut+unsu...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---




