OK... Brock helped clear up my issue about using the AS3 library with the HTML/Javascript source type. Thanks man. Instead of grabbing the params out of the flashvars, you just call out to the container to get the token:
var os:Object = ExternalInterface.call("opensocial.Container.get");
openSocialToken = os.osToken_;
openSocialSurface = os.osMode_.name_;
var owner_id:String = os.params_.ownerid;
// initialize myspace container
MySpaceContainer.instance.init(openSocialToken, openSocialSurface);
etc...
I've been able to integrate some ACC functionality into my AS3 code by calling these JS wrappers from Flash using External Interface:
// call this method via external interface from flash
function sendInvite(recipient_id,msg) {
message = opensocial.newMessage(msg);
opensocial.requestShareApp(recipient_id, message);
}
// call this method via external interface from flash
function sendMessage(recipient_id,subject,content,messageType){
try {
dataReqObj = osContainer.newDataRequest(); dataReqObj.add(osContainer.newFetchPeopleRequest(recipient_id),"OWNER_FRIENDS");
dataReqObj.send(
function (data)
{
recipientPerson = data.get("OWNER_FRIENDS").getData().asArray();
var message = opensocial.newMessage(content);
message.setField(opensocial.Message.Field.TITLE, subject);
message.setField(opensocial.Message.Field.TYPE, messageType);
osContainer.postTo(os_token, message, recipientPerson[0]);
}
);
} catch (e) {
alert("error: "+e.message);
}
}
which you call from AS3 like:
ExternalInterface.call("sendMessage",recipientId,subject,content,"SEND_MESSAGE");
ExternalInterface.call("sendInvite",recipientId,message);
etc...