amit...@gmail.com
unread,Sep 9, 2008, 2:33:41 AM9/9/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenSocial - OpenSocial Application Development
Hello,
Suddenly getting of owner and viewer info is not working in orkut
sandbox. The same code is working in hi5 sandbox.
It returns null for both owner and viewer.
It was working perfectly before yesterday.
The same code is working perfectly in code runner application.
Please check the below code.
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="GetOwnerViewerTest" >
<Require feature="opensocial-0.7"/>
</ModulePrefs>
<Content type="html"><![CDATA[
<script language="javascript">
var _owner,_owner;
function loadOwnerAndViewerData()
{
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER),
"owner");
if (opensocial.hasPermission(opensocial.Permission.VIEWER))
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),"viewer");
req.send(loadOwnerAndViewerDataComplete);
};
function loadOwnerAndViewerDataComplete(data)
{
_owner = data.get("owner").getData();
if(data.get("viewer"))
_viewer = data.get("viewer").getData();
alert("_owner="+_owner.getId());
alert("_viewer="+_viewer.getId());
};
loadOwnerAndViewerData();
</script>
]]></Content>
</Module>
Thanks,
Amit