Hello JuanWalker,

Just to clean the things up:

1) Technically you can retrieve a single person, but it will need to check
container policies. For orkut, if you try to get an user profile passing
opensocialid you will see an error message: "forbidden: get profile
permission denied", so, in orkut will not work.

2) There´s no way to access friends->friends, e.g, NETWORK_DISTANCE > 1 .
You just can access owner friends and viewer friends.

See an example, and let me know if you have any doubt:


function loadFriends()
{
    var req = opensocial.newDataRequest();
    var idspec_params = {};

    // will work
    //idspec_params[opensocial.IdSpec.Field.USER_ID] =
opensocial.IdSpec.PersonId.OWNER;

    // will not work
    idspec_params[opensocial.IdSpec.Field.USER_ID] = "45647656345253242";
    var idspec = opensocial.newIdSpec(idspec_params);
    var opt_params = {};
    opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 100;
    req.add(req.newFetchPeopleRequest(idspec,opt_params),'viewerFriends');

    req.send(onLoadFriends);
}

function onLoadFriends(resp)
{
    var data = resp.get('viewerFriends');
    var html = new Array();

    html.push('<ul>');

    if (!data.hadError())
    {
        var viewerFriends = data.getData();

        viewerFriends.each(function(person){
            html.push('<li>' + person.getDisplayName() + '</li>');
        });
    }

    html.push('</ul>');

    var layerNome = document.getElementById("nomes");
    layerNome.innerHTML=html.join('');

}



2010/2/16 JuanWalker <[email protected]>

> Hi Marco, afaik orkut only allow 1000 friends so there's a limit for
> my application?? So my question is. there a limit for access only
> access  1000  network friends and their friends lists??
>
> Or what exactly do you mean?
>
> On 16 feb, 06:14, Marco Antonio <[email protected]> wrote:
> > To have access to friends list of a particular person you need to be part
> of your network of friends!
> >
> >                             SUCCESS, their focus, my COMMITMENT! ! !
> >
> > ________________________________
> > De: JuanWalker <[email protected]>
> > Para: Orkut Developer Forum <[email protected]>
> > Enviadas: Segunda-feira, 15 de Fevereiro de 2010 14:13:15
> > Assunto: [orkut-developer] Fetch friends list from a person
> >
> > Hi may I ask If this feature is available yet?? According with an old
> > discussion opensocial 0.8 support this and I'm needing to retrieve the
> > friend list from a specified person
> >
> > Thanks for answer 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 [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<opensocial-orkut%[email protected]>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/opensocial-orkut?hl=en.
> >
> >
> ____________________________________________________________________________________
> > Veja quais são os assuntos do momento no Yahoo! +Buscadoshttp://
> br.maisbuscados.yahoo.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Orkut Developer Forum" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<opensocial-orkut%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/opensocial-orkut?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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-orkut?hl=en.

Reply via email to