I am using orkut and am using the gadget specification in the
opensocial developer's guide. Also included below .
Thanks
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="List Friends Example">
<Require feature="opensocial-0.7"/>
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript">
/**
* Request for friend information.
*/
function getData() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),
'viewer');
req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS),
'viewerFriends');
req.send(onLoadFriends);
};
/**
* Parses the response to the friend information request and
generates
* html to list the friends along with their display name.
*
* @param {Object} dataResponse Friend information that was
requested.
*/
function onLoadFriends(dataResponse) {
var viewer = dataResponse.get('viewer').getData();
var html = 'Friends of ' + viewer.getDisplayName();
html += ':<br><ul>';
var viewerFriends = dataResponse.get('viewerFriends').getData();
viewerFriends.each(function(person) {
html += '<li>' + person.getDisplayName() + '</li>';
});
html += '</ul>';
document.getElementById('message').innerHTML = html;
};
gadgets.util.registerOnLoadHandler(getData);
</script>
<div id="message"> </div>
]]>
</Content>
</Module>
On Apr 15, 11:24 pm, "Dinesh Kumar Subramanian"
<[EMAIL PROTECTED]> wrote:
> Hi,
> Can you give further info . Which container(orkut,myspace,hi5 etc)
> you are using. And if possible paste your code or give further info
> about what you are trying to do.
>
> Regards
> Dinesh
>
> On 4/16/08, Sony <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I am new to OpenSocial and I am looking at the application code in the
> > OpenSocial Developer's Guide. All that I am trying to accomplish is
> > get a list of friends. I am using Google Gadget Editor. I get an error
> > - gadgets.util is null or not an object....Help please.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---