[TIMOB-7798] iOS: Facebook Feed Dialog always reports success, even if the user cancelled the dialog
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-09T16:47:02.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Arthur Evans |
Assignee | Eric Merriman |
Created | 2012-02-23T23:16:13.000+0000 |
Updated | 2017-06-09T16:47:02.000+0000 |
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.
// must be logged in to Facebook before this bit
var data = {
link : "http://www.appcelerator.com",
name : "Appcelerator Titanium Mobile",
message : "Checkout this cool open source project for creating mobile apps",
caption : "Appcelerator Titanium Mobile",
picture : "http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png",
description : "You've got the ideas, now you've got the power. Titanium translates your hard won web skills into native applications..."
};
Titanium.Facebook.dialog("feed", data, function(e) {
if(e.cancelled) {
alert('Cancelled');
} else if(e.success) {
alert("Success! From FB: " + e.result);
} else {
if(e.error) {
alert(e.error);
} else {
alert("Unkown result");
}
}
});
Closing ticket due to time passed, any problems please open a new ticket.