In Your Application:
function setSkin() {
document.write('');
}
}}}
'''Using hi5.*'''
Add to any data request:
([wiki:SamplePhotoDownloadJSCode More detailed code] has also been submitted by [http://www.pixverse.com PixVerse].)
{{{
#!xml
if(gadgets.util.hasFeature('hi5')) {
req.add(hi5.newFetchStatusRequest('OWNER'),'ownerStatus');
req.add(hi5.newFetchPresenceRequest('VIEWER_FRIENDS'),'viewerFriendsPresence');
req.add(hi5.newFetchAlbumsRequest('OWNER'),'ownerAlbums');
}
}}}
Note that currently, for security purposes, we only expose the viewer's albums through this call, regardless of the value of the parameter set in the hi5.newFetchAlbumsRequest() call.
Retrieving the data in your handler:
{{{
#!xml
if(gadgets.util.hasFeature('hi5')) {
var ownerStatus = data.get('ownerStatus').getData();
var viewerFriendsPresence = data.get('viewerFriendsPresence').getData();
var ownerAlbums = data.get('ownerAlbums').getData();
}
}}}
See hi5 Open Social API for return values: [wiki:JsAPI]
----
= Sample Code Resources =
* '''[http://lou.sandbox.hi5.com/friend/apps/entry/webvan.hi5.com/gadgets/gifts.xml Basic Gifts Tutorial]'''
* '''[http://lou.sandbox.hi5.com/friend/apps/entry/www.webvan.hi5.com/friend/apps/developer/app/get/xml/5197 Gifts with i18n]'''
* '''[http://lou.sandbox.hi5.com/friend/apps/entry/www.sandbox.hi5.com/friend/apps/developer/app/get/xml/5206 Template Demo]'''
----