Hello,
Can you please help me! Where do I specify the profile id?
How does the sample code below knows which profile I am accessing?
I tried replacing the word VIEWER with the sandbox uid but empty
results.
Thanks,
Sree
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="People API Howto">
<Require feature="opensocial-0.5" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<script type="text/javascript">
_IG_RegisterOnloadHandler(request);
function request() {
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("4694083120338855923"), "viewer");
req.send(response);
}
function response(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;
}
</script>
<div id='main'/>
]]>
</Content>
</Module>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Orkut Discussion" 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-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---