Facebook Actionscript Api没有错误反馈消息

时间:2013-05-24 22:51:35

标签: facebook actionscript-3 flex facebook-actionscript-api

我正在使用facebook-actionscript-api开发一个小型移动项目。

一切正常我基本上是使用示例文件中的代码片段。但是我没有收到传递给回调函数的失败对象的反馈消息或描述。

private function handlePost ( result : Object, fail : Object ) : void {
    if(result) {
        trace("POSTED");
    } else {
        trace( fail ); // returns [object Object]
        trace( fail[0] ); // returns undefined
        trace( JSON.encode(fail) ); // returns nothing ''
    }
}

如何调试错误? 这里有错误吗?我正在使用最新版本(1.8.1)。

1 个答案:

答案 0 :(得分:0)

private function handlePost ( result : Object, fail : Object ) : void {
    if(result) {
        trace("POSTED");
    } else {        
        trace("Login Failed");  
        trace('code: '+fail.error.code); 
        trace('message: '+fail.error.message);
        trace('type: '+fail.error.type); 
    }
}