Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- (void)dialogDidComplete:(FBDialog*)dialog is called even when user selected "Skip" #11

Closed
duckeatapple opened this issue Aug 23, 2010 · 3 comments

Comments

@duckeatapple
Copy link

When user canceled the dialog, I believe some other functions should be called instead of dialogDidComplete.

@yujuan
Copy link

yujuan commented Aug 26, 2010

The dialogDidComplete actually means the user click a button within the webView dialog and get the dialog go through. No matter the user click the Cancel or OK button. To see whether the dialog did succeed or not, if it is LoginDialog, the dialog fbDidLogin and fbDidNotLogin will corresponding to successfully log in or user cancel the login. For other dialog you would need to parse the url returned from the webView dialog by implementing the delegate method defined in FBDialog.h

  • (void)dialogCompleteWithUrl:(NSURL *)url;.

    For example, stream.publish, if succeed, the returned url will have a post_id appended to the url. We will have a document for all dialogs about what would be a succeed url. Check back with our facebook developer website.

Hope this explains. Thanks!

@jesseclark
Copy link

It seems that it would be a pretty common requirement to need to know whether the dialog was closed because the user canceled or because the dialog completed the action it was intended for.

In the current API if the user clicks the x in the top right of a dialog the FBDialog method - (void)dialogDidCancel:(NSURL *)url gets called which subsequently calls the delegate method - (void) dialogDidNotComplete.

So it seems that there is some intention of letting the developer know that an action was cancelled. Perhaps it was just an oversite that the skip button doesn't similarly trigger this effect.

Regarding parsing the url in dialogCompleteWithUrl, the url returned by the publish dialog when the skip button is pressed seems to be "fbconnect://success" which doesn't do a very good job of indicating that the user chose to cancel an action.

Either way this API could stand to be improved quite a bit.

@jverdi
Copy link

jverdi commented Nov 17, 2011

We ran into this with ShareKit as well:
ShareKit/ShareKit#83

Seems there are issues open in Facebook's bug tracker for this:
http://developers.facebook.com/bugs/137604089677897?browse=search_4ec3715ee70598199320073
https://developers.facebook.com/bugs/153320298096609?browse=search_4ec373f2be1aa0313896178

It's referenced here on GitHub in issues:
#11 (closed) - #11
#74 - #74
#209 - #209

Please make it a priority to get a fix for this into the master repo.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants