hi there,
I was trying to build a widget at myspace.com by using Flex 3, I have
read the doc at
http://wiki.developer.myspace.com/index.php?title=Official_OpenSocial_ActionScript3_Library
I got an error null for the fields object, I did some invesgations with the code, it looks like the INITcouldn't be set successfully ==>>> MySpaceContainer.instance.init(osToken,
osSurfaceName);
You may view the code at http://www.privatepaste.com/441BSlgBV7 as well.
Does anyone had this error before? I appreciate for any hints.
Thank you
------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.Grouping;
import MyOpenSpace.*
import opensocial.*
public function getViewer():void
{
var osToken:String = Application.application.parameters.openSocial_token;
var osSurfaceName:String = Application.application.parameters.openSocial_surface;
MySpaceContainer.instance.init(osToken, osSurfaceName);
var dr:MSDataRequest = opensocial.newDataRequest() as MyOpenSpace.MSDataRequest;
dr.add(dr.newFetchPersonRequest('VIEWER', ['BOOKS']), 'ViewerPerson');
dr.send(onLoadPerson);
}
public function onLoadPerson(dataResponse:DataResponse):void
{
var person:Person = opensocial.Person(dataResponse.get('ViewerPerson').getData());
var fields:Object = person.getFields();
}
]]>
</mx:Script>
<mx:Button label="Get Person" click="getViewer();"/>
</mx:Application>