Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7798] iOS: Facebook Feed Dialog always reports success, even if the user cancelled the dialog

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-09T16:47:02.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterArthur Evans
AssigneeEric Merriman
Created2012-02-23T23:16:13.000+0000
Updated2017-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");
			}
		}
	});

Comments

  1. Lee Morris 2017-06-09

    Closing ticket due to time passed, any problems please open a new ticket.

JSON Source