{ "id": "88296", "key": "TIMOB-8127", "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": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13277", "name": "Sprint 2012-08", "archived": true, "released": true, "releaseDate": "2012-04-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-04-17T14:58:33.000+0000", "created": "2012-03-20T15:31:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "SupportTeam", "api" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-06T18:16:45.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": "h4. Problem Description\r\nCustomer adds a Facebook.authorize(); from an app, without any results. \r\n\r\nh4. Actual Results\r\nThe function never goes and logs into facebook.\r\n\r\nh4. Expected results \r\nThe app should be able to login into fb\r\n\r\nh4. Test Case \r\n1. Create a new mobile project\r\n2. Add the code in the example to a button\r\n3. Run it \r\n{code}\r\nwishToShareViaFacebook.addEventListener('click', function(e){ \r\n if (e.index == 0) { \r\n if (Titanium.Facebook.loggedIn) { \r\n var data = { link: \"www.jokwear.com\", name: \"Great Apparel, Great Message\", message: \"Check out JokWear!\", caption: \"Follow your favourite athletes, support other athletes\", picture: \"http://jokwear.com/images/joklogo.gif\", description: \"JokWear is a clothing brand that not only touts excellent fabric but also a social movement that you can achieve anything you set your mind to.\", test: [ {foo:'Encoding test', bar:'Durp durp'}, 'test' ] }; Titanium.Facebook.requestWithGraphPath('me/feed', data, 'POST', showRequestResult); \r\n} else {\r\n Titanium.Facebook.authorize();\r\n}\r\n}\r\n});\r\n{code}\r\n\r\nh4. Extra info\r\nThere is a bug where platform didn't want to launch the FB authorize from a dialog, since it's bad practice to get a dialog from a dialog. So, we recommended the customer to add an app event catching this, closing the dialog and then adding the other dialog. It's not runnning. \r\n\r\nThe customer creates a small function doing a setTimeout, and that way, the function it's called properly within the if. ", "attachment": [], "flagged": false, "summary": "iOS: You can't call the Facebook Authorization from a Dialog (not even with app events)", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": "Titanium SDK version: 1.8.2\r\nPlatform & version: iOS 5.0\r\nDevice Details: iOS simulator\r\nHost Operating System: OSX 10.7.3 \r\nTitanium Studio version: 1.0.9", "comment": { "comments": [ { "id": "187567", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mauro - Please provide the complete environment information for these tickets.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-20T16:42:45.000+0000", "updated": "2012-03-20T16:42:45.000+0000" }, { "id": "190751", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Done. \r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-04-12T11:17:11.000+0000", "updated": "2012-04-12T11:17:11.000+0000" }, { "id": "191272", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Aha. I think I get at what's happening here. I might be able to modify Kitchen Sink to recreate the situation. Basically, since the dialog is a real UI window and becomes the key window, the FB module tries to insert itself into the dialog as it goes away.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-16T19:06:53.000+0000", "updated": "2012-04-16T19:06:53.000+0000" }, { "id": "191274", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mauro, does this describe what you're seeing?\r\n{code}\r\n// Set Titanium.Facebook.appid\r\n// Set Titanium.Facebook.permissions\r\n\r\nvar authenticateButton = Ti.UI.createButton({\r\n\ttitle:'Authenticate',\r\n\ttop:110,\r\n\twidth:160,\r\n\theight:40\r\n});\r\nauthenticateButton.addEventListener('click', function() {\r\n\tvar a = Titanium.UI.createAlertDialog({\r\n\t\ttitle:'Authorize?',\r\n\t\tbuttonNames:['Authorize','Cancel'],\r\n\t\tcancel:2,\r\n\t});\r\n\ta.addEventListener('click', function(e)\r\n\t{\r\n\t\tif(e.index==0){\r\n\t\t\tvar temp = Titanium.Facebook.forceDialogAuth;\r\n\t\t\tTitanium.Facebook.forceDialogAuth=true;\t\t\t\r\n\t\t\tTitanium.Facebook.authorize();\r\n\t\t\tTitanium.Facebook.forceDialogAuth = temp;\r\n\t\t}\r\n\t});\r\n\ta.show();\r\n});\r\nwin.add(authenticateButton);\r\n{code}", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-16T19:24:47.000+0000", "updated": "2012-04-16T19:24:47.000+0000" }, { "id": "191276", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull https://github.com/appcelerator/titanium_mobile/pull/2018 pending.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-16T19:54:44.000+0000", "updated": "2012-04-16T19:54:44.000+0000" }, { "id": "191364", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Yes, that's the behavior! TY!\r\n\r\nM", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-04-17T10:09:51.000+0000", "updated": "2012-04-17T10:09:51.000+0000" }, { "id": "409335", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-06T18:16:45.000+0000", "updated": "2017-03-06T18:16:45.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }