Is there no other way? Please help me out and let me know ..

Thanks,
Harsha,

On Jul 10, 12:38 pm, Harsha <[EMAIL PROTECTED]> wrote:
> I want to have all of the friends list and one way is to set the
> opensocial.DataRequest.PeopleRequestFields.MAX paramater. But no way
> does a person have fixed number, some might have less than 100 and
> some might have more than that, if we assume that we have set the MAX
> parameter to 100.
>
> So It would fetch only 100, at a time. What if a person have more than
> 100 friends?
>
> I have seen the collection object, which actually have a totalsize
> equal to total total number of friends and an array having 20 items
> and an offset value. Does this collection object carry the whole
> information, showing an array of 20(default, if we does not set the
> MAX parameter) items? If so is there any way to iterate through the
> collection object and get the details of friends?
>
> Thanks,
> Harsha.
>
> <script>
>         function loadFriends() {
>           var req = opensocial.newDataRequest();
>           req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
>           req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS',
> opt_params), 'viewerFriends');
>           req.send(onLoadFriends);
>         }
>
>         function onLoadFriends(data) {
>           var viewer = data.get('viewer').getData();
>           var viewerFriends = data.get('viewerFriends').getData();
>
>          // Get the info of friends, but only for 20(default .. if the
> MAX parameter is not set)
>         }
>
>         function init() {
>             loadFriends();
>         }
>
>         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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to