Which container are you using?
~Arne
On Sat, Apr 19, 2008 at 11:27 AM, Rakesh <[EMAIL PROTECTED]> wrote:
>
> I am getting an error in newFetchPersonRequest when I pass a userId
> to
> the request. See code below
> I am perfectly getting the friend id in "e.id" but in call back
> function dataResponse.hadError() is true and var friend is null
> Could you explain this please?
>
> function OnClickFriend(e)
> {
> var req = opensocial.newDataRequest();
> var param = {};
> param[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
> [opensocial.Person.Field.ALL];
> req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
> 'viewer');
> req.add(req.newFetchPersonRequest(e.id), 'singleFriend');
> alert(e.id);
> req.send(OnLoadSingleFriend); };
>
>
> function OnLoadSingleFriend(dataResponse)
> {
> alert("callback");
> var friend = dataResponse.get('singleFriend').getData();
> alert(dataResponse.hadError());
> alert(friend);
> document.getElementById('friendDetails').innerHTML =
> friend.getDisplayName();
>
>
>
> }
>
> >
>
--
OpenSocial IRC - irc://irc.freenode.net/opensocial
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---