forge.facebook.ui回调与空iOS上调用(forge.facebook.ui call

2019-07-04 01:55发布

我在使用Trigger.io Forge的麻烦,让来自本地FB朋友选择UI回调。 问题是只显示在iOS,做工精细Android上。

运行在任一iPhone设备或仿真器上的催化剂此代码使得FB对话正确显示。

>forge.facebook.ui({
        method: 'apprequests',
        message: 'Hey'
    }, function(a){console.log('success: '+JSON.stringify(a))}, function(error) {console.log('error:'+JSON.stringify(error))});
>undefined
>success: null

当选择一些用户,并发送请求对话关闭,但回调不会被调用。 下面以伪造调试日志显示了:

[DEBUG] Native call: {
[DEBUG]     callid = "35938A56-CEEC-44E1-8742-889D273F6E9E";
[DEBUG]     method = "facebook.ui";
[DEBUG]     params =     {
[DEBUG]         "exclude_ids" = "";
[DEBUG]         message = "invited you to play Halo 4";
[DEBUG]         method = apprequests;
[DEBUG]     };
[DEBUG]     start = "1353579502.975";
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG]     callid = "35938A56-CEEC-44E1-8742-889D273F6E9E";
[DEBUG]     content = "<null>";
[DEBUG]     status = success;
[DEBUG] }
[DEBUG] 2012-12-05 13:04:09.631 Forge[5110:c07] An instance 0x9dd3700 of class  FBSessionManualTokenCachingStrategy was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info:
[DEBUG] <NSKeyValueObservationInfo 0x9dcad90> (
[DEBUG] <NSKeyValueObservance 0x9dd1300: Observer: 0x9de4680, Key path: accessToken, Options: <New: NO, Old: NO, Prior: YES> Context: 0x112ad4, Property: 0xc9a6fe0>
[DEBUG] <NSKeyValueObservance 0x9dbba50: Observer: 0x9de4680, Key path: expirationDate, Options: <New: NO, Old: NO, Prior: YES> Context: 0x112ad4, Property: 0xc9a0a60>
[DEBUG] )

我们试图伪造的1.4版,1.4.21,没有喜悦。 我相信这是值得做的回调内容= NULL。

谢谢你的帮助。

UPDATE詹姆斯,你是正确的-在iPhone回调获取调用,但响应总是空。 我期待着收到FB用户ID和请求ID的对象。

作为参考,Android是工作正常,返回:

[DEBUG] Native call "facebook.ui" with task.params: {"method":"apprequests","message":"Hey"}
[DEBUG] Returning: {"content":{"to[0]":"100004602392907","request":"453015091412347",
                                   "to[1]":"515252483"},
                                    "status":"success",
                                    "callid":"ED47AAB4-7A72-45A0-B0B3-0DADC9A75E9C"}

如果用户取消FB的对话,这是返回:

[DEBUG] Returning: {"content":{},"status":"success",
                        "callid":"256CB78F-3EE1-4BD7-8990-EDE26275D68F"}

Answer 1:

针对此修补程序将包含在v1.4.23 Trigger.io平台版本。

您的成功回调将被调用(对于apprequests为例):

{"request":"519074534448448","to[0]":"105000524002524"}

注意:如果用户点击取消您的成功回调还是会被调用: {}将作为回调参数传递。

如果他们打x在左上角,你的失败回调将被调用。



文章来源: forge.facebook.ui callback invoked with null on iOS