You need to make a couple of changes to the code to make it work in openSocial0.8.
The following code needs to be altered:
<mx:XML id="GetOwnerNameAndIdXML" xmlns="">
<script1>
<![CDATA[
function()
{
var os = opensocial.Container.get();
var dataRequest = os.newDataRequest();
var param = {};
param[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [opensocial.Person.Field.ID,MyOpenSpace.Person.Field.ABOUT,MyOpenSpace.Person.Field.BOOKS];
var OWNERReq = os.newFetchPersonRequest(opensocial.DataRequest.PersonId.OWNER, param);
dataRequest.add(OWNERReq);
dataRequest.send(getResponse);
function getResponse(response)
{
var flashobj = document.getElementById('OpenSocialExample');
var OWNER = response.get(opensocial.DataRequest.PersonId.OWNER).getData();
var ReturnData =
{
'OWNER_ID' : OWNER.getField(opensocial.Person.Field.ID),
'OWNER_NAME' : OWNER.getField(opensocial.Person.Field.NAME),
}
flashobj.SetOwner(ReturnData);
}
}
]]>
</script1>
</mx:XML>
To the following:
<mx:XML id="GetOwnerNameAndIdXML" xmlns="">
<script1>
<![CDATA[
function()
{
os = opensocial.Container.get();
dataRequest = os.newDataRequest();
var param = {};
var OWNERReq = os.newFetchPersonRequest(opensocial.IdSpec.PersonId.OWNER, param);
dataRequest.add(OWNERReq, "get_owner");
dataRequest.send(getResponse);
function getResponse(response){
var flashobj = document.getElementById('OpenSocialExample');
var OWNER = response.get("get_owner").getData();
var ReturnData = {
'OWNER_ID': OWNER.getField(opensocial.Person.Field.ID),
'OWNER_NAME': OWNER.getDisplayName(),
}
flashobj.SetOwner(ReturnData);
}
}
]]>
</script1>
</mx:XML>
You should be able to use this template to rewrite the 'GetOwnerNameAndIdXML' node also.
Also, there is another great app for learning how to program opensocial: 'DEMO OpenSocial v0.8 Editor'
which can be found at:
http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=124902
Let me know if you need anything else.
-J