{ "id": "110332", "key": "AC-2061", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "8", "description": "", "name": "Needs more info" }, "resolutiondate": "2013-03-04T20:17:09.000+0000", "created": "2013-02-27T18:18:30.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:01.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": "14550", "name": "Appcelerator Modules", "description": "Please enter tickets related to Modules here." } ], "description": "Calling Ti.Facebook.logout causes an error \"FBSession: should only be used from a single thread\".\r\n\r\nSince the \"startup\" function is running on the main thread, the \"logout\" function should be called on the main thread as well by using \"TiThreadPerformOnMainThread\", in this file: https://github.com/appcelerator/titanium_modules/blob/master/facebook/mobile/ios/Classes/FacebookModule.m\r\n\r\nThis is probably quite important as the logout functionality no longer works in the latest builds.", "attachment": [ { "id": "35919", "filename": "Screen Shot 2013-03-05 at 3.21.01 PM.png", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-05T20:25:38.000+0000", "size": 146445, "mimeType": "image/png" } ], "flagged": false, "summary": "[iOS] Facebook logout", "creator": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "environment": "Facebook 3.1 SDK, iOS, TiSDK 3.1.0", "comment": { "comments": [ { "id": "240595", "author": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Tommy,\n\nCan you provide some further information on this issue\n- Titanium Studio/SDK version\n- Operating System\n\nCould you also provide a small reproducible test case that will allow us to verify this issue.\n\nThank you for your assistance.\nJamie", "updateAuthor": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T20:16:55.000+0000", "updated": "2013-03-04T20:16:55.000+0000" }, { "id": "240606", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "body": "Ti SDK: 3.1.0 CI\r\nOS: iOS6\r\n\r\n1. Click login and and sign in to fb.\r\n2. Click logout and error message shows up\r\n\r\nAlso as a side, after logout is successful and user tries to login again, it still keeps the previous user.\r\n\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar button = Ti.UI.createButton({\r\n\ttitle: 'logout'\r\n});\r\nbutton.addEventListener('click', function(){\r\n\tTi.Facebook.logout();\r\n})\r\n\r\nwin1.add(button);\r\n\r\nvar button2 = Ti.UI.createButton({\r\n\ttitle: 'login',\r\n\ttop: 90,\r\n});\r\nbutton2.addEventListener('click', function(){\r\n\tTi.Facebook.authorize();\r\n})\r\n\r\nwin1.add(button2);\r\n\r\nwin1.open();\r\n\r\n\r\nTi.Facebook.appid = '495338853813822';\r\nTitanium.Facebook.permissions = ['publish_stream'];\r\nTi.Facebook.forceDialogAuth = true;\r\n\r\nTi.Facebook.addEventListener('login', function(e) {\r\n if (e.success) {\r\n alert('Logged In');\r\n } else if (e.error) {\r\n alert(e.error);\r\n } else if (e.cancelled) {\r\n alert(\"Canceled\");\r\n }\r\n});\r\n\r\nTi.Facebook.addEventListener('logout', function(e) {\r\n alert('Logged out');\r\n});\r\n{code}", "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-04T21:04:06.000+0000", "updated": "2013-03-04T21:05:24.000+0000" }, { "id": "240652", "author": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Tommy,\n\nIn the 3.1.0 build of titanium facebook has been moved to its own module and so will not work, I would suggest using a GA build if you would like to use this API at the moment", "updateAuthor": { "name": "jbuckley", "key": "jbuckley", "displayName": "Jamie Buckley", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-05T00:33:33.000+0000", "updated": "2013-03-05T00:33:33.000+0000" }, { "id": "240759", "author": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "tlsg", "key": "tlsg", "displayName": "Tommy Leung", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-05T20:24:45.000+0000", "updated": "2013-03-05T20:27:57.000+0000" }, { "id": "246311", "author": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "body": "have the same problem\n\nusing fb.auth in one file and try to logout later in another.", "updateAuthor": { "name": "fincha", "key": "fincha", "displayName": "Alexander Frischbutter", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-04-07T16:10:55.000+0000", "updated": "2013-04-07T16:10:55.000+0000" }, { "id": "246335", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did you try the fix from TIMOB-12828? You'll need to use the latest CI build.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-07T20:27:00.000+0000", "updated": "2013-04-07T20:27:00.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }