Please find the answers below:

1. The default number of friends returned by the newFetchPeopleRequest
call is 20 hence you see only 20 friends returned. But as explained in
the following article:
http://code.google.com/apis/opensocial/articles/datarequests/datarequests-0.8.html#fetchPeople
you can use  "opensocial.DataRequest.PeopleRequestFields.MAX" filter
to specify the number of friends you'd like to retrieve. The following
sample can be executed in the OpenSocial Dev App (http://
osda.appspot.com/)

function getMyFriends() {
  var request = opensocial.newDataRequest();

  request.add(request.newFetchPersonRequest
(opensocial.IdSpec.PersonId.VIEWER), 'viewer');
  var viewerFriends = opensocial.newIdSpec({"userId" : "VIEWER",
"groupId" : "FRIENDS"});
  var opt_params = {};
  opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 40;

  request.add(request.newFetchPeopleRequest(viewerFriends,
opt_params), 'viewerFriends');
  request.send(processFriends);
}


function processFriends(data) {
  var viewer = data.get('viewer').getData();
  var outputString = "";

  var friends = data.get('viewerFriends').getData();

  outputString += "<ul>";

  friends.each(
    function(person) {
    outputString = outputString + "<li>" + person.getDisplayName() ;
    outputString = outputString + " <img src=\'" + person.getField
(opensocial.Person.Field.THUMBNAIL_URL) + "\'";
  });

 outputString += "</ul>";

 output(outputString);
}


2. The checkbox 'Allow access to my photos' does not have anything to
to do with the thumbnail URL. It only lets you use the albums API to
access photos from your app (http://code.google.com/apis/orkut/
articles/albums/). The above sample also has code for getting the
thumbnail url and displaying it for each of the friends.

3. Yes, when the app is removed, all the data for the app will also be
removed.

- Vijaya

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

Reply via email to