1

我正在使用本机 Facebook 插件进行申请,如下所示:

forge.facebook.ui(
    {
        method: "apprequests",
        title: "How well do you know your friends?",
        message: "Play this friends guessing game with me. This is just like the game Guess Who with Facebook.",
        to: 100005076427220
    },
    function(response) {
        alert('succ:' + JSON.stringify(response));
    }, function(response){
        alert('error:' + JSON.stringify(response));
    }
);

在 Android 上一切看起来都很好。这是调试输出:

[   INFO] D/Forge   (11035): Native call facebook.ui with task.params: {"method":"apprequests","title":"How well do you know your friends?","message":"Play this friends guessing game with me. This is just like the game Guess Who with Facebook.","to":100005076427220}
[   INFO] D/Forge   (11035): Returned: {"content":{"to[0]":"100005076427220","request":"1404036919832397"},"callid":"39281D3C-EACE-4070-937C-3BE1852DA12F","status":"success"}

不幸的是,iOS 上不是。这是调试输出:

[DEBUG] Native call: {
[DEBUG]     callid = "BF08EEC1-175D-483F-846B-319721A82B04";
[DEBUG]     method = "facebook.ui";
[DEBUG]     params =     {
[DEBUG]         message = "Play this friends guessing game with me. This is just like the game Guess Who with Facebook.";
[DEBUG]         method = apprequests;
[DEBUG]         title = "How well do you know your friends?";
[DEBUG]         to = 100005076427220;
[DEBUG]     };
[DEBUG] }
[DEBUG] 2013-10-30 15:53:53.283 Forge[732:907] -[__NSCFNumber UTF8String]: unrecognized selector sent to instance 0x1cdd9c20
[DEBUG] Returning to javascript: {
[DEBUG]     callid = "BF08EEC1-175D-483F-846B-319721A82B04";
[DEBUG]     content =     {
[DEBUG]         message = "-[__NSCFNumber UTF8String]: unrecognized selector sent to instance 0x1cdd9c20";
[DEBUG]         type = "UNEXPECTED_FAILURE";
[DEBUG]     };
[DEBUG]     status = error;

可以看到,参数method = apprequests; 没有像在 Android method = "apprequests" 中那样被引用;它不是来自我的代码,而是来自公共插件本身。

这有可能导致错误吗?

我正在使用平台版本 v2.0.3 和 Facebook 模块 v2.0.1

4

0 回答 0