Thanks Kumar! So if the guest of the profile (the viewer) doesn't have
the application I can't get her ID?

On 11 jun, 10:53, "Kumar Majethia" <[EMAIL PROTECTED]> wrote:
> Hi Ricardo,
>
> The viewer should have added the app to her profile in order for you to get
> the ViewerID. That's how you distinguish viewers who have the app installed
> vs those that don't.
>
> HTH
> KM
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[EMAIL PROTECTED] On Behalf Of Ricardo
> Sent: Wednesday, June 11, 2008 7:17 PM
> To: OpenSocial - OpenSocial Application Development
> Subject: [OpenSocial] Problems getting the viewer ID
>
> I'm having some problems determinating the viewer ID. When the owner
> of the application is visualizing it, I have access to both owner and
> viwer ID and they are the same. But, when the viwer is visualizing the
> application on other user profile the viewer ID is undefined.
> This code is in the request:
>
> var req = opensocial.newDataRequest();
> var params = {};
> params[opensocial.DataRequest.PeopleRequestFields.MAX] = 1000;
> params[opensocial.DataRequest.PeopleRequestFields.FILTER] =
> opensocial.DataRequest.FilterType.HAS_APP;
>
> req.add(req.newFetchPersonRequest('OWNER'), 'owner');
> req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
>
> req.add(req.newFetchPeopleRequest('OWNER_FRIENDS', params),
> 'ownerFriends');
> req.send(onLoadData);
>
> This code is in the response:
>
> globalOwner = data.get('owner').getData();
> globalViewer = data.get('viewer').getData();
> var ownerFriends = data.get('ownerFriends').getData();
>
> So, I try:
> alert(globalViewer.getId()); //and I get undefined hehre
>
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to