{ "id": "161784", "key": "MOD-2273", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-07-18T10:37:30.000+0000", "created": "2016-07-14T10:44:55.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "different_account", "facebook", "login" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-07-18T10:37:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14521", "name": "Facebook" } ], "description": "h6.Reproduce Step.\r\n1. Copy the following code to app.js file.\r\n{code}\r\nvar fb = require('facebook');\r\n\r\nvar win = Ti.UI.createWindow({\r\n\ttitle : 'Login/Logout',\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\n//fb module listener\r\nfb.addEventListener('login', function(e) {\r\n\tif (e.success) {\r\n\t\talert('login from uid: ' + e.uid + ', name: ' + JSON.parse(e.data).name);\r\n\t} else if (e.cancelled) {\r\n\t\t// user cancelled\r\n\t\talert('cancelled');\r\n\t} else {\r\n\t\talert(e.error);\r\n\t}\r\n});\r\n\r\nfb.addEventListener('logout', function(e) {\r\n\talert('logged out');\r\n});\r\n\r\nvar loginButton = fb.createLoginButton({\r\n\treadPermissions : ['read_stream', 'email'],\r\n\theight: 100,\r\n\twidth: 100,\r\n\ttop : 260\r\n});\r\nwin.add(loginButton);\r\n\r\nvar CurrentStatus = Ti.UI.createButton({\r\n\ttitle : 'Current Status',\r\n\ttop : 50,\r\n\twidth : 160,\r\n\theight : 40\r\n});\r\nwin.add(CurrentStatus);\r\n\r\nCurrentStatus.addEventListener('click', function() {\r\n\tif (fb.getLoggedIn()) {\r\n\t\talert(\"Current UID: \" + fb.getUid());\r\n\t} else {\r\n\t\talert('Not logged in.');\r\n\t}\r\n});\r\n\r\nwin.open();\r\n{code}\r\n2. Setting all the necessary key pair for facebook (ref: our doc)\r\n3. Run the app.\r\n\r\nh6.Problem.\r\n1. If you run it first time, it will be fine. Then if you click the same button to logout. Then click login again. You will not able to login another account. Always the same one.\r\n2. Even you set the facebook account in device -> setting, it will not impact the result. Change the account in setting, does not help too.\r\n\r\nh6.Note.\r\nSometimes, clean the browser will help. But not all the time, not sure why.\r\n\r\nHelp advise. ", "attachment": [], "flagged": false, "summary": "Facebook Module: Can't login another FB account once logged in first.", "creator": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "subtasks": [], "reporter": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "environment": "FaceBook Module 5.2.0\r\nTiSDK 5.3.1", "comment": { "comments": [ { "id": "390693", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sliang] please change the title to better indicate the problem", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-14T13:03:11.000+0000", "updated": "2016-07-14T13:03:11.000+0000" }, { "id": "390825", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~sliang] As discussed on Flowdock, I am 90 % sure that this is the native behavior of the Facebook SDK. As [~jvennemann] noted, the logout method is not used to logout the user from Facebook, but only from the current app that used the Facebook SDK. In detail that means that - as long as the user a) has the Facebook app installed or b) is logged into Facebook in Safari / native browser, the \"xxxx already authorized \" will appear. If really necessary, I would create a native Xcode-project to demonstrate the behavior, but that be obsolete. Please let me know what they need here.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-07-15T21:56:43.000+0000", "updated": "2016-07-15T22:05:44.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }