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
-~----------~----~----~----~------~----~------~--~---

Reply via email to