在iOS上使用null调用forge.facebook.uicallback

我在使用Trigger.io Forge时遇到了问题,并从本地FB好友select器UI获取callback。 问题只在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 

当select一些用户并发送请求时,对话closures,但回叫从不被调用。 Forgedebugging日志中显示以下内容:

 [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] ) 

我们尝试了Forge版本1.4,1.4.21,没有喜悦。 我认为这是callbackcontent = null。

谢谢你的帮助。

更新詹姆斯,你是正确的 – iPhonecallback调用,但响应始终为空。 我希望收到一个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"} 

Trigger.io平台版本将包含此修复程序。

你的成功callback将被调用(例如apprequests):

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

注意:如果用户点击取消,您的成功callback仍将被调用: {}将作为callbackparameter passing。

如果他们点击左上angular的x ,则会调用您的失败callback。

Interesting Posts