{ "id": "159432", "key": "TIMOB-23182", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2016-04-10T18:53:56.000+0000", "created": "2016-04-08T19:03:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "facebook", "ios", "login" ], "versions": [ { "id": "17993", "description": "Release 5.2.2", "name": "Release 5.2.2", "archived": false, "released": true, "releaseDate": "2016-04-05" } ], "issuelinks": [], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-04-10T18:53:56.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Facebook login is not working on latest SDK.\r\n*Testing Environment:*\r\nTitanium SDK: 5.2.2.GA\r\nAppcelerator Command-Line Interface, version 5.2.2\r\nFacebook module version: 5.0.1\r\nTesting device: iPod 5G(9.2)\r\n\r\n*Testing Code:*\r\n{code}\r\nvar fb = require('facebook');\r\nvar win = Ti.UI.createWindow({\r\n\ttitle : 'Login/Logout',\r\n\tbackgroundColor : '#fff',\r\n\r\n});\r\nvar label = Ti.UI.createLabel({\r\n\ttext : 'Logged In = ' + fb.loggedIn,\r\n\tcolor : '#000',\r\n\tfont : {\r\n\t\tfontSize : 20\r\n\t},\r\n\ttop : 10,\r\n\ttextAlign : 'center'\r\n});\r\nwin.add(label);\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\tlabel.text = 'Logged In = ' + fb.loggedIn;\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\nfb.authorize();\r\nfb.addEventListener('logout', function(e) {\r\n\talert('logged out');\r\n\tlabel.text = 'Logged In = ' + fb.loggedIn;\r\n});\r\nvar loginButton = fb.createLoginButton({\r\n\treadPermissions : ['email'],\r\n\ttop : 100,\r\n\twidth : 150,\r\n\theight : 100\r\n});\r\n\r\nwin.add(loginButton);\r\nwin.open();\r\n{code}\r\n\r\n*Testing Result:*\r\nFacebook login not working and login dialog not appear for IOS.", "attachment": [], "flagged": false, "summary": "Facebook login is not working on iOS ", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "Using newest stable Appcelerator Studio and SDK's.\r\n", "comment": { "comments": [ { "id": "382228", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, \r\n\r\nI have tested the issue in iOS simulator and device with SDK 5.2.1.GA, 5.2.2.GA. I couldn't reproduce the issue. Facebook Login is working as expected. Use the below code instead. Facebook module Version 5.1.0\r\n\r\n{code}\r\nvar fb = require('facebook');\r\n\r\nvar win = Ti.UI.createWindow({\r\n\r\n title : 'Login/Logout',\r\n\r\n backgroundColor : '#fff',\r\n\r\n});\r\n\r\nvar label = Ti.UI.createLabel({\r\n\r\n text : 'Logged In = ' + fb.loggedIn,\r\n\r\n color : '#000',\r\n\r\n font : {\r\n\r\n fontSize : 20\r\n\r\n },\r\n\r\n top : 10,\r\n\r\n textAlign : 'center'\r\n\r\n});\r\n\r\nwin.add(label);\r\n\r\nfb.addEventListener('login', function(e) {\r\n\r\n if (e.success) {\r\n\r\n alert('login from uid: ' + e.uid + ', name: ' + JSON.parse(e.data).name);\r\n\r\n label.text = 'Logged In = ' + fb.loggedIn;\r\n\r\n } else if (e.cancelled) {\r\n\r\n // user cancelled\r\n\r\n alert('cancelled');\r\n\r\n } else {\r\n\r\n alert(e.error);\r\n\r\n }\r\n\r\n});\r\n\r\nfb.initialize();\r\nfb.authorize();\r\nfb.addEventListener('logout', function(e) {\r\n\r\n alert('logged out');\r\n\r\n label.text = 'Logged In = ' + fb.loggedIn;\r\n\r\n});\r\n\r\nvar loginButton = fb.createLoginButton({\r\n\r\n readPermissions : ['email'],\r\n\r\n top : 100,\r\n\r\n width : 150,\r\n\r\n height : 100\r\n\r\n});\r\n\r\nwin.add(loginButton);\r\n\r\nwin.open();\r\n{code}\r\n\r\nI have added this additional code. This is required after you set up login/logout listeners and permissions\r\n{code}\r\nfb.initialize();\r\n{code}\r\n\r\nRegards,\r\nSharif.\r\n", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2016-04-08T20:58:59.000+0000", "updated": "2016-04-10T18:53:44.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }