[TIMOB-13738] Android: Facebook Module's e.cancelled state not working anymore
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-05-15T06:42:51.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | 2013 Sprint 10 API, 2013 Sprint 10, Release 3.1.1, Release 3.2.0 |
Components | Android |
Labels | qe-closed-3.1.1, regression |
Reporter | Raju Neyyan |
Assignee | Ping Wang |
Created | 2013-04-29T10:14:06.000+0000 |
Updated | 2014-06-19T12:44:08.000+0000 |
Description
*Problem description*
e.cancelled in the facebook login event which was fired when the close button of the facebook authorize dialogue was clicked is not working any more in the new facebook module in the 3.1.0 Titanium SDK.
*Test case*
var win = Ti.UI.createWindow({
backgroundColor : "#FFF"
});
var fb = require('facebook');
fb.appid = FACEBOOK_APP_ID; // appid goes here
fb.addEventListener('login', facebook_connect);
function facebook_connect(e) {
if (e.success) {
alert("Login Success!");
} else if (e.error) {
alert("Something went wrong");
} else if (e.cancelled) {
alert("Close button clicked"); // Not working anymore
}
}
win.add(fb.createLoginButton({
top : 50,
style : fb.BUTTON_STYLE_WIDE
}));
win.open();
Tested and confirmed on Samsung Galaxy S2 Android 2.3.6 with Ti SDK 3.1 GA. Cancelled state is not called when closing the dialog, or when cancelling at "App Y has already been authorized" screen.
PR: https://github.com/appcelerator/titanium_modules/pull/114
PR to update zip in SDK: https://github.com/appcelerator/titanium_mobile/pull/4269 3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4270
Verified e.cancelled is firing with: Mac OS 10.8.3 Safari: 6.0.4 Xcode 4.6.2 CLI: 3.1.1-alpha Alloy: 1.1.3-alpha Appcelerator Studio, build: 3.1.1.201305271814 Titanium SDK version 3.1.1.v20130524180421 on: Nexus 4 4.2.1 Nexus 10 4.2 Galaxy S II 2.3.6
Why are you making changes to the Facebook module code, and not updating the module version number? I am seeing new behavior with the module that was downloaded along with the 3.1.1 update, yet I can't rollback to the previous module since the new one is also 3.0.0! Please, whenever you update production code - update the version. You are breaking production code when you're not updating the module version numbers. Please make sure to have the previously released 3.0.0 module, and the new one, available under different version numbers. This needs to be fixed ASAP. Thanks.