I do have the <Require feature="opensocial-0.5" /> line in my code as
follows, but I am still getting the "opensocial is not defined
javascript error" as reported by Firebug.  It shows "Old content"
instead of "New Content" like it is supposed to.  Is this an issue on
the Google side or am I just missing something?

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="People API Howto" description="My first Google
Gadget for testing" author="Raymond Law" height="200" width="320">
<Require feature="opensocial-0.5" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<div id='main'/><p><b>Old</b> content</p></div>
<script type="text/javascript">
_IG_RegisterOnloadHandler(request);
function request() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.send(response);
}

function response(data) {
// do something with the data
//var viewer = data.get("viewer").getData();
//var name = viewer.getDisplayName();
//var thumb = viewer.getField(opensocial.Person.Field.THUMBNAIL_URL);
//var profile = viewer.getField(opensocial.Person.Field.PROFILE_URL);
//profile = 'http://sandbox.orkut.com' + profile;
//var html = '<img src="' + thumb + '"/>';
//html+='<a href="' + profile + '" target="_top">' + name + '</a>';
//document.getElementById('main').innerHTML = html;
document.getElementById('main').innerHTML = '<p><b>New</b> content</
p>';
}
</script>
]]>
</Content>
</Module>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Developers" group.
To post to this group, send email to opensocial-api@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to