I have been trying to get this to work too, but so far no luck. The spec for newFetchPeopleRequest actually says that the parameter can be an ID or array of IDs, but it doesn't work.
This is key to making any app social. That people can see basic info like name and thumnail of other users besides their friends is essential for many things. Playing games with other users, message board discussions, etc.
function getPeopleInfo() {
var req = opensocial.newDataRequest();
var ids = [6221];
req.add(req.newFetchPeopleRequest(ids), 'people');
req.send(onLoadPeople);
}
function onLoadPeople(dataResponse) {
var p = dataResponse.get('people').getData();
p.each(function(person) { // this throws an error
alert(person.getDisplayName());
});
}