Possible Duplicate:
forge.facebook.ui callback never run
I’m trying to use Trigger.io’s facebook methods to display a friend selector. It displays properly but never returns any data.
response is always null even when a friend is selected. According to the Facebook docs it should return request and to fields so I can capture to whom the request was sent.
Here is some sample code:
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
});
For this, Catalyst outputs
success response
null
And the Trigger Toolkit outputs
[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] }
Am I doing it wrong? Or is this library not working correctly?
Update, 12/5/12
It appears that this is an iOS only issue. It’s happening on the iOS simulator (and device) for both iOS5 and iOS6. But works fine on the Android simulator:
[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"}
A fix for this will be included in v1.4.23 Trigger.io platform version.
Your success callback will be invoked with (for apprequests for example):
Note: your success callback will still be invoked if the user hits cancel:
{}will be passed as the callback parameter.If they hit the
xin the top-left corner, your failure callback will be invoked.