You should indicate that you want ALL friends to be retrieved, default is 20.

See 
http://code.google.com/apis/opensocial/docs/0.8/reference/#opensocial.DataRequest.PeopleRequestFields.MAX

Code example from Chris Chabot :

  var req = opensocial.newDataRequest();
  var spec = opensocial.newIdSpec({"userId" : "OWNER", "groupId" : "FRIENDS"});
  var params = {
    "max" : 1000
  };
  req.add(req.newFetchPeopleRequest(spec, params), "req_friends");

On Sat, Jan 24, 2009 at 7:12 AM, vick <jain.viv...@gmail.com> wrote:

On Sat, Jan 24, 2009 at 7:12 AM, vick <jain.viv...@gmail.com> wrote:
>
> hi,
> m using following code to retrive all friends..somehow i am able to
> display only 20 friends!!!
> help me...
>
>
>
> <script type="text/javascript">
>
>    function init(){
>     request();
>    }
>
>
>      function request() {
>        var idspec = opensocial.newIdSpec({ "userId" : "OWNER",
> "groupId" : "FRIENDS" });
>        var req = opensocial.newDataRequest();
>        req.add(req.newFetchPersonRequest
> (opensocial.IdSpec.PersonId.OWNER), "get_owner");
>        req.add(req.newFetchPeopleRequest(idspec), "get_friends");
>        req.send(response);
>      };
>
>
>      function response(dataResponse) {
>        var owner = dataResponse.get('get_owner').getData();
>        var friends = dataResponse.get('get_friends').getData();
>        var html = 'All rockstar Friends of ' + owner.getDisplayName
> ();
>        html += ':<br><ul>';
>        friends.each(function(person) {
>          html += '<li>' + person.getDisplayName() + '</li>';
>        });
>        friends.each(function(person) {
>          html += '<li>' + person.getDisplayName() + '</li>';
>        });
>        html += '</ul>';
>        document.getElementById('message').innerHTML = html;
>      };
>
>
>
>      gadgets.util.registerOnLoadHandler(init);
>
>    </script>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to opensocial-api@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to