{ "id": "94442", "key": "TIMOB-9878", "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": [ { "id": "13502", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 Core", "archived": true, "released": true, "releaseDate": "2012-07-15" }, { "id": "13504", "description": "Sprint 2012-14 MW", "name": "Sprint 2012-14 MW", "archived": true, "released": true, "releaseDate": "2012-07-15" }, { "id": "13870", "description": "", "name": "Sprint 2012-16 API", "archived": true, "released": true, "releaseDate": "2012-08-13" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "13496", "description": "Release 2.0.3", "name": "Release 2.0.3", "archived": true, "released": false } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-09T02:54:40.000+0000", "created": "2012-07-05T04:08:35.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "api", "module_api", "parity", "qe-testadded", "regression" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [ { "id": "18343", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "inwardIssue": { "id": "94531", "key": "TIMOB-9900", "fields": { "summary": "TiAPI: Update Facebook SDK to latest version on all platforms", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "18988", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "90768", "key": "TIMOB-8865", "fields": { "summary": "iOS - Facebook offline_access deprecation", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-10T11:27:50.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "h2. Problem description\r\nWhen using Ti.Facebook to login, once the user has entered their credentials and clicks login, the screen shows a 'Page not found' error and the login fails. However, trying to login again the second time, works. It also works if the app on Facebook is set as Native/Desktop and not Web.\r\n\r\nh2. Steps to reproduce\r\n1. Create a Facebook app (be sure it is set to Web, as it is by default)\r\n2. Create an app with the code below (set the app id accordingly to the Facebook app)\r\n3. Click the 'Login with Facebook' button\r\n4. Enter a valid Facbeook account credentials and click Login\r\n\r\n{code}\r\nTi.Facebook.appid = '[APP ID]';\r\nTi.Facebook.permissions = ['publish_stream'];\r\nTi.Facebook.addEventListener('login', function(e) {\r\n    if (e.success) {\r\n        alert('Logged in');\r\n    }\r\n});\r\nTi.Facebook.addEventListener('logout', function(e) {\r\n    alert('Logged out');\r\n});\r\n\r\nvar win2 = Ti.UI.createWindow();\r\n\r\n// Add the button.  Note that it doesn't need a click event listener.\r\nwin2.add(Ti.Facebook.createLoginButton({\r\n    top : 50,\r\n    style : Ti.Facebook.BUTTON_STYLE_WIDE\r\n}));\r\n\r\nwin2.open();\r\n{code}\r\n\r\nh2. Expected result\r\nFacebook authentication happens and we are able to log into Facebook.\r\n\r\nh2. Current result\r\nA 'Page not found' screen is shown as soon as the login is performed.\r\n\r\nh2. Related links\r\nLooks like the problem is also present on native apps, and it does not occour if the app is set as Native/Desktop.\r\n\r\nSee this topic for some details: http://developers.facebook.com/blog/post/2012/03/02/enhanced-auth-dialog-and-updates-to-permissions/", "attachment": [ { "id": "30316", "filename": "log.txt", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-07T05:07:44.000+0000", "size": 9309, "mimeType": "text/plain" }, { "id": "29813", "filename": "Screenshot 2012.07.16 15.56.59.png", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T15:57:54.000+0000", "size": 52567, "mimeType": "image/png" } ], "flagged": false, "summary": "TiAPI: Facebook authorization has changed and login does not work anymore", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [ { "id": "95032", "key": "TIMOB-9951", "fields": { "summary": "Android: update FB SDK to latest version", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 5.1\r\nAndroid 2.3.4\r\nSDK 2.1.0 GA", "comment": { "comments": [ { "id": "201571", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "A quick test in Mobile Web shows that it's having some issues too, although not as severe. Everything logs in OK, but the log in window doesn't disappear and we don't get the callback saying we are logged in. The user is logged in though, and if the page is reloaded, then everything works just fine. I'm not sure if it's caused by the same underlying issue causing problems on iOS and Android, but the timing is suspicious.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-05T09:33:08.000+0000", "updated": "2012-07-05T09:33:08.000+0000" }, { "id": "201843", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "This issue came from community (titans) and forwarded to us by Jeff H. Can platform look into this ASAP?", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-07-06T10:49:56.000+0000", "updated": "2012-07-06T10:49:56.000+0000" }, { "id": "203069", "author": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "body": "What was the resolution here? My assumption was that this was a FB error, since others (not Titanium people) were having problems with both the API and web versions?\r\n\r\nJust curious.", "updateAuthor": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "created": "2012-07-12T19:09:01.000+0000", "updated": "2012-07-12T19:09:01.000+0000" }, { "id": "207881", "author": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening issue. \r\nAfter pressing \"Login with Facebook\" button, an error message \"An error occurred. Please try again later\" appears. After clicking \"OK\" button and putting the credentials it will be possible to login to the Facebook.\r\n\r\nTested with:\r\nTitanium Studio, build: 2.1.1.201207121732\r\nTitanium SDK: 2.1.1.v20120712160111\r\nDevices: iPhone Simulator 5.1; iPad 2 (5.1.1); iPod 5.1", "updateAuthor": { "name": "rumbrasas", "key": "rumbrasas", "displayName": "Rima Umbrasas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T16:04:53.000+0000", "updated": "2012-07-16T16:04:53.000+0000" }, { "id": "207920", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as fixed. Tested with:\r\nTitanium Studio, build: 2.1.1.201207161421\r\nTitanium SDK: 2.1.1.v20120712160111\r\nDevice: iPad 3rd gen (5.1.1)", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T17:28:15.000+0000", "updated": "2012-07-16T17:28:15.000+0000" }, { "id": "207923", "author": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For QE - use this code with specified app. ID:\r\n{code}\r\nTi.Facebook.appid = '134793934930';\r\nTi.Facebook.permissions = ['publish_stream'];\r\nTi.Facebook.addEventListener('login', function(e) {\r\n if (e.success) {\r\n alert('Logged in');\r\n }\r\n});\r\nTi.Facebook.addEventListener('logout', function(e) {\r\n alert('Logged out');\r\n});\r\n \r\nvar win2 = Ti.UI.createWindow();\r\n \r\n// Add the button. Note that it doesn't need a click event listener.\r\nwin2.add(Ti.Facebook.createLoginButton({\r\n top : 50,\r\n style : Ti.Facebook.BUTTON_STYLE_WIDE\r\n}));\r\n \r\nwin2.open();\r\n{code}", "updateAuthor": { "name": "tsmolich", "key": "tsmolich", "displayName": "Tamila Smolich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T17:29:56.000+0000", "updated": "2012-07-16T17:29:56.000+0000" }, { "id": "207933", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For Mobile Web: you will need to use a different App ID than the one mentioned by @Tamila that is custom tailored to your testing environment. See http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/Mobile_Web_Debugging_and_Testing_Tools-section-31525350_MobileWebDebuggingandTestingTools-Facebook for more information about using Facebook on MW.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-16T18:04:01.000+0000", "updated": "2012-07-16T18:04:01.000+0000" }, { "id": "212108", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Reopening to edit labels", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-06T10:47:18.000+0000", "updated": "2012-08-06T10:47:18.000+0000" }, { "id": "213091", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "For SDK 2.0.3,Application (for the code posted by Tamila in the comments) crashes on Android but not on iOS.Please find the errorlogs attached in the bug.\r\n\r\nTested with Titanium SDK: 2.0.3.v20120806151610\r\nTested with Titanium Studio: 2.1.1.201207271312\r\nPlatform & version: iOS (5.1)\r\nDevice Details: iPhone 4S, Android Emulator (2.2), Android Galaxy Note (2.3.6)\r\nHost Operating System: OSX 10.8", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-07T05:06:57.000+0000", "updated": "2012-08-07T05:08:22.000+0000" }, { "id": "213177", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The NPE error reported in the last comment is because there is no constant \"Ti.Facebook.BUTTON_STYLE_WIDE\" in Android in 2_0_X branch. Those constants were added in 2_1_X (TIMOB-6234) and will not be back ported to 2_0_X. Therefore, for the test in 2_0_X branch we should use the test case below:\r\n{code}\r\nTi.Facebook.appid = '495338853813822';\r\nTi.Facebook.permissions = ['publish_stream'];\r\nTi.Facebook.addEventListener('login', function(e) {\r\n if (e.success) {\r\n alert('Logged in');\r\n }\r\n});\r\nTi.Facebook.addEventListener('logout', function(e) {\r\n alert('Logged out');\r\n});\r\n \r\nvar win2 = Ti.UI.createWindow();\r\n \r\n// Add the button. Note that it doesn't need a click event listener.\r\nif (Titanium.Platform.name == 'android') {\t\r\n\twin2.add(Ti.Facebook.createLoginButton({\r\n\t\ttop : 50,\r\n\t\tstyle : 'wide'\r\n\t})); \r\n} else {\t\r\n\twin2.add(Ti.Facebook.createLoginButton({\r\n\t\ttop : 50,\r\n\t\tstyle : Ti.Facebook.BUTTON_STYLE_WIDE\r\n\t})); \r\n}\r\n \r\nwin2.open();\r\n{code}", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-07T11:11:21.000+0000", "updated": "2012-08-07T11:28:19.000+0000" }, { "id": "213281", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "closing and verified( as per the code posted by Ping Wang in the comment)\r\n\r\nTested with Titanium SDK: 2.0.3.v20120806151610\r\nTested with Titanium Studio: 2.1.1.201207271312\r\nPlatform & version: iOS (5.1)\r\nDevice Details: iPhone 4S, Android Emulator (2.2), Android Google Nexus (4.0.2), Android Galaxy Note (2.3.6)\r\nHost Operating System: OSX 10.8", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-07T23:24:38.000+0000", "updated": "2012-08-07T23:24:38.000+0000" }, { "id": "213500", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note that the property BUTTON_STYLE_WIDE was defined on Android in 2.1.0 (TIMOB-6234). Earlier, it existed only on iOS. This is outside the scope of the Facebook SDK update. So any applications that upgrade from 2.0.X to 2.0.3 will work fine without any changes. The test case in the bug was written with the 2.1.0 SDK in mind so it does not work for 2.0.X. As far as the end developers are concerned this is a non issue. ", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-08T22:41:08.000+0000", "updated": "2012-08-08T22:41:08.000+0000" }, { "id": "213505", "author": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Reopening to update labels.", "updateAuthor": { "name": "nchhabra", "key": "nchhabra", "displayName": "Neha Chhabra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2012-08-09T02:53:24.000+0000", "updated": "2012-08-09T02:53:24.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }