Hy Guys,
I m new to this open social world and i want to develop an Orkut Application
using Open Social API and using Google Gadget Editor. I was just making a
small program of Listing Friends but it is not giving me anything.
It is not calling the
gadgets.util.registerOnLoadHandler(init);
And GGE is not recognizing this and also no response for
opensocial.newDataRequest();
...
I m really stuck....
Plzz somebody help mee....
My code is...
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Gifts part 1 - Friends">
<Require feature="opensocial-0.7"/>
</ModulePrefs>
<Content type="html">
<![CDATA[*
<script type="text/javascript">
*function loadFriends() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest('VIEWER'), 'viewer');
req.add(req.newFetchPeopleRequest('VIEWER_FRIENDS'), 'viewerFriends');
req.send(onLoadFriends);
}
function onLoadFriends(data) {
var viewer = data.get('viewer').getData();
var viewerFriends = data.get('viewerFriends').getData();
html = new Array();
html.push('<ul>');
viewerFriends.each(function(person) {
html.push('<li>' + person.getDisplayName() + "</li>");
});
html.push('</ul>');
document.getElementById('friends').innerHTML = html.join('');
}
function init() {
loadFriends();
}
*
gadgets.util.registerOnLoadHandler(init);
</script>
<div id='main'>
Your friends:
<div id='friends'></div>
</div>*
]]>
</Content>
</Module>
*
*
--
Umair Farooqi
BIT-7, 6th Sem,Reg No.135
NUST University,Islamabad,Pakistan
Cell No. +92-0322-8568108
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" 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-api?hl=en
-~----------~----~----~----~------~----~------~--~---