The friends retrieved with the following request come back with way
more fields than I want
----------------------------------------------
function retrievePersistentData() {
var req = opensocial.newDataRequest();
var fields = []
fields.push(opensocial.Person.Field.ID);
var params = {};
params[opensocial.DataRequest.PeopleRequestFields.MAX] = 1000;
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
fields;
params[opensocial.DataRequest.PeopleRequestFields.SORT_ORDER] =
opensocial.DataRequest.SortOrder.NAME;
// Person
req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
// Person's app data
req.add(req.newFetchPersonAppDataRequest("VIEWER", "*"),
"viewer_data");
// Friends
req.add(req.newFetchPeopleRequest("VIEWER_FRIENDS", params),
"viewer_friends");
// Friends' app data
req.add(req.newFetchPersonAppDataRequest("VIEWER_FRIENDS", "*"),
"viewer_friends_data");
req.send(retrievePersistentDataCallback);
}
----------------------------------------------
Here's an example of what I get back for each friend:
{"obj_":{"AboutMe":"","AllowSend":true,"FullName":
{"FamilyName":"Mouton","GivenName":"Jerome","Unstructured":"Jerome
Mouton"},"Id":"04949685334420555411","Links":
[{"Name":"profileUrl","Url":"/Profile.aspx?
uid=3348070161004746231"}],"Location":"","Name":"Jerome
Mouton","Nickname":"","Occupation":"","Presence":"OFFLINE","ProfileEdited":false,"ShowStatus":false,"Status":"","Thumbnail":"http://
img1.orkut.com/images/small/1192289885/106832451.jpg"},
Why doesn't my
opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS restriction
work?
Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut Developer Forum" 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-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---