{ "id": "86921", "key": "TIMOB-7798", "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": "2017-06-09T16:47:02.000+0000", "created": "2012-02-23T23:16:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-09T16:47:02.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": "Given the following code, the Facebook response always returns with success==true and cancelled == false, even if the user cancels out of the dialog. The only way to detect the negative response seems to be checking the \"result\" field, which is undefined if the user canceled the post.\r\n\r\n{code}\r\n // must be logged in to Facebook before this bit\r\n\tvar data = {\r\n\t\tlink : \"http://www.appcelerator.com\",\r\n\t\tname : \"Appcelerator Titanium Mobile\",\r\n\t\tmessage : \"Checkout this cool open source project for creating mobile apps\",\r\n\t\tcaption : \"Appcelerator Titanium Mobile\",\r\n\t\tpicture : \"http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png\",\r\n\t\tdescription : \"You've got the ideas, now you've got the power. Titanium translates your hard won web skills into native applications...\"\r\n\t};\r\n\tTitanium.Facebook.dialog(\"feed\", data, function(e) {\r\n\t\tif(e.cancelled) {\r\n\t\t\talert('Cancelled');\r\n\t\t} else if(e.success) {\r\n\t\t\talert(\"Success! From FB: \" + e.result);\r\n\t\t} else {\r\n\t\t\tif(e.error) {\r\n\t\t\t\talert(e.error);\r\n\t\t\t} else {\r\n\t\t\t\talert(\"Unkown result\");\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Facebook Feed Dialog always reports success, even if the user cancelled the dialog", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "421633", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket due to time passed, any problems please open a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-09T16:47:02.000+0000", "updated": "2017-06-09T16:47:02.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }