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
Comments
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
Hope this explains. Thanks! |
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. |
We ran into this with ShareKit as well: Seems there are issues open in Facebook's bug tracker for this: It's referenced here on GitHub in issues: Please make it a priority to get a fix for this into the master repo. |
When user canceled the dialog, I believe some other functions should be called instead of dialogDidComplete.
The text was updated successfully, but these errors were encountered: