Hello ,

In the code given below can you tell me what should i do to use display
photos instead of display names ??
What should i write in place of the code mentioned below in "bold figures"
to get display photos of friends.
*
**function* updateGiftList(viewer, data, friends) {
*var* json = *null*;
*if* (data[viewer.getId()]) {
json = data[viewer.getId()]['gifts'];
}

*if* (!json) {
globalGivenGifts = {};
}
*try* {
globalGivenGifts = gadgets.json.parse(gadgets.util.unescapeString(json));
} *catch* (e) {
globalGivenGifts = {};
}

*var* html = *new* Array();
html.push('You have given:');
html.push('<ul>');
*for* (i in globalGivenGifts) {
*if* (i.hasOwnProperty) {
*for* (j in globalGivenGifts[i]) {
*if* (j.hasOwnProperty) {
html.push('<li>', *friends.getById(i).getDisplayName()*, ' received ',
globalGiftList[globalGivenGifts[i][j]], '</li>');
}
}
}
}
html.push('</ul>');
*document*.getElementById('given').innerHTML = html.join('');
}*
*
The full version of this code is given in

http://opensocial-resources.googlecode.com/svn/samples/tutorial/tags/api-0.8/gifts_7_remote.xml

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