Hi amdex,

The docs [1] are a little vague on this, so I understand the
confusion.  Currently you have to use
opensocial.DataRequest.PersonId.VIEWER or
opensocial.DataRequest.PersonId.OWNER and not the IDs.  This code will
make a request for the viewer's Person object (accessible by the key
"viewer"):

function requestData() {
    req = opensocial.newDataRequest();
 
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
"viewer");
    req.send(responseData);
}

Hope that helps,
Lane

[1] 
http://code.google.com/apis/opensocial/docs/javascript/reference/opensocial.DataRequest.html#newFetchPersonRequest


On Nov 30, 12:48 am, amdex <[EMAIL PROTECTED]> wrote:
> Hi Siegi
>
> I acted as logged in user inside sandbox,
> where viewer==owner, means myself:-)
> viewer, and owner as well as viewer_friends and owner_friends were
> perfectly ok.
>
> Andrey
>
> On Nov 29, 7:44 pm, siegi <[EMAIL PROTECTED]> wrote:
>
> > Hi Andrey,
>
> > I would like to verify that. Could you please add some information in
> > which state you session has been?
> > Have you acted as a logged in user, was the viewer object filled and
> > was viewer=owner or vice versa?
>
> > Cheers
> > Siegi
>
> > On 29 Nov., 09:56, amdex <[EMAIL PROTECTED]> wrote:
>
> > > Hi All!
>
> > > Has anyone managed to makenewFetchPeopleRequestrequest for 
> > > specificpersonIdexecutable?
>
> > > what I am trying to do is
> > >  function requestData() {
> > >     req = opensocial.newDataRequest();
> > >     req.add(req.newFetchPersonRequest("1234567890"), "friends");
> > >     req.send(responseData);
>
> > > }
>
> > > function responseData(data) {
> > >     var resp = data.get("friends");
> > >     if (resp.hadError()) {
> > >         document.getElementById('dev').innerHTML = "error occured";
> > >         return;
> > >     }
> > >     friends = resp.getData();
> > >     friends.each(function(person) {
> > >       ....
> > >     });
>
> > > }
>
> > > for "1234567890" I am using validpersonIdand I am always getting
> > > null instead of response, so line if (resp.hadError())  already fires
> > > exception
>
> > > Any ideas?
> > > Andrey
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Discussion" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to