{ "id": "79571", "key": "TIMOB-5091", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2011-11-18T11:34:37.000+0000", "created": "2011-08-24T06:06:56.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-11-18T11:34:58.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": "Since 1.6.x to 1.7.x functionality with regards calling Ti.Facebook.authorize() does not work inside an alert dialog event listener.\r\n\r\n{code}\r\nTitanium.Facebook.appid = \"181219095251677\";\r\nTitanium.Facebook.permissions = ['publish_stream', 'read_stream', 'offline_access'];\r\n \r\nfacebookNotConnected = function() {\r\n if(Ti.Facebook.loggedIn === false) {\r\n var alertDialog = Titanium.UI.createAlertDialog({\r\n title : 'Facebook',\r\n message : 'You need to login with Facebook',\r\n buttonNames : ['Login Facebook', 'No Thanks']\r\n });\r\n alertDialog.addEventListener('click', function(e) {\r\n if(e.index === 0) {\r\n Titanium.Facebook.authorize();\r\n };\r\n });\r\n alertDialog.show();\r\n }\r\n}\r\n{code}\r\n\r\nHowever, when the authorize call is placed in a setTimeout with at least 400ms, the authorize call works just fine.\r\n \r\nSee Q&A: http://developer.appcelerator.com/question/124236/call-facebookauthorize-from-alert-dialog", "attachment": [], "flagged": false, "summary": "iOS: Call Facebook.authorize() from alert dialog", "creator": { "name": "wgiezeman", "key": "wgiezeman", "displayName": "Wienke", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "wgiezeman", "key": "wgiezeman", "displayName": "Wienke", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS 4.3.2, Ti SDK 1.7.2 timestamp=07/21/11 09:36 githash=97c3689", "comment": { "comments": [ { "id": "173230", "author": { "name": "wgiezeman", "key": "wgiezeman", "displayName": "Wienke", "active": true, "timeZone": "Europe/Berlin" }, "body": "Dear Appcelerator,\r\n\r\n\r\nAre there plans on fixing this. I think this is a widely used feature. Because the Facebook popup is familiar it is way more trusted then using the Graph API with a own UI.\r\n\r\nKind regards,\r\nWienke Giezeman", "updateAuthor": { "name": "wgiezeman", "key": "wgiezeman", "displayName": "Wienke", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-11-18T00:14:34.000+0000", "updated": "2011-11-18T00:14:34.000+0000" }, { "id": "173307", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Launching a dialog from another dialog is not supported and not generally a good idea. Consider hiding the dialog and using an app level event to launch the FB dialog.", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-18T11:34:37.000+0000", "updated": "2011-11-18T11:34:37.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }