So you would do something like: 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 Thu, Jan 22, 2009 at 5:58 PM, Bert Van den Brande <cyr...@gmail.com>wrote: > > 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 > > > On Thu, Jan 22, 2009 at 7:24 AM, rinku dongaria > <rinku.donga...@gmail.com> wrote: > > Hello friends ... > > Can any one tell me how i cn retrieve all the friends in the friend list > .. > > ?? > > > > I tried this code given below .. but it is giving only a list of 20 > friends > > inspite of giving all friends .. > > > > <script> > > function request() { > > > > var params = {}; > > > > params[opensocial.DataRequest.PeopleRequestFields.FILTER] = > > opensocial.DataRequest.FilterType.ALL; > > params[opensocial.DataRequest.PeopleRequestFields.SORT_ORDER] = > > opensocial.DataRequest.SortOrder.NAME; > > > > > > var idspec = opensocial.newIdSpec({ "userId" : "VIEWER", "groupId" : > > "FRIENDS" }); > > var req = opensocial.newDataRequest(); > > req.add(req.newFetchPersonRequest(opensocial.IdSpec.PersonId.VIEWER), > > "get_viewer"); > > req.add(req.newFetchPeopleRequest(idspec, params), "get_friends"); > > req.send(response); > > } > > > > > > function response(dataResponse) { > > var viewer = dataResponse.get('get_viewer').getData(); > > var friends = dataResponse.get('get_friends').getData(); > > var html = 'Friends of ' + viewer.getDisplayName(); > > html += ':<br><ul>'; > > friends.each(function(person) { > > html += '<li>' + person.getDisplayName() + '</li>'; > > }); > > html += '</ul>'; > > document.getElementById('message').innerHTML = html; > > }; > > > > // Execute the request function when the application is finished loading. > > gadgets.util.registerOnLoadHandler(request); > > > > </script> > > <div id="message"> </div> > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---