可能重复:
forge.facebook.ui 回调从未运行
我正在尝试使用 Trigger.io 的 facebook 方法来显示朋友选择器。它正确显示但从不返回任何数据。
response
null
即使选择了朋友也总是如此。根据 Facebook 文档,它应该返回request
和to
字段,以便我可以捕获请求发送给谁。
这是一些示例代码:
forge.facebook.ui({
method: 'apprequests',
title: 'Create Game',
message: 'I challenge you to a game!'
}, function(response) {
console.log('success response');
console.log(''+response); // As string because logging null errors Catalyst
});
为此,催化剂输出
success response
null
触发器工具包输出
[DEBUG] Native call: {
[DEBUG] callid = "F8446A0D-44AE-46E4-A587-16BEC78EE695";
[DEBUG] method = "facebook.ui";
[DEBUG] params = {
[DEBUG] message = "I challenge you to a game!";
[DEBUG] method = apprequests;
[DEBUG] title = "Create Game";
[DEBUG] };
[DEBUG] start = "1354655948.023";
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG] callid = "F8446A0D-44AE-46E4-A587-16BEC78EE695";
[DEBUG] content = "<null>";
[DEBUG] status = success;
[DEBUG] }
我做错了吗?还是这个库不能正常工作?
更新,12/5/12
这似乎是一个 iOS 唯一的问题。它发生在 iOS5 和 iOS6 的 iOS 模拟器(和设备)上。但在 Android 模拟器上运行良好:
[DEBUG] Native call "facebook.ui" with task.params: {"method":"apprequests","title":"Create Game","message":"I challenge you to a game!"}
[DEBUG] Returning: {"content":{"to[0]":"1175220065","request":"349563028475745"},"status":"success","callid":"548FE13D-69D9-415B-9A94-762D9F7C64B1"}