I have implemented the FBNativeDialogs. Everything is working great except that I would like to know when the FBNativeDialogs is dismissed.
I know there is the handler but according to the documentation ( https://developers.facebook.com/docs/reference/ios/3.1/class/FBNativeDialogs/ FBShareDialogHandler ) FBShareDialogHandler defines a handler that will be called in response to the native share dialog being displayed. It is true that in other part of the same documentation they say the same handler is called when the dialog is dismissed. After some time spend on the matter, I found that the first statement is true.
So I am looking for a method to know that the FBShareDialogHandler has been dismissed. I have also tried viewDidDisappear but apparently it doesn't either.
You set the handler when you call the method, it looks like this:
[FBNativeDialogs presentShareDialogModallyFrom:viewController initialText:@"Some text..." image:nil url:someUrl handler:^(FBNativeDialogResult result, NSError *error) {
if (error) {
} else {
switch (result) {
case FBNativeDialogResultCancelled:
//The user has dismissed the dialog
break;
case FBNativeDialogResultSucceeded:
//The user shared
break;
case FBNativeDialogResultError:
//There was an error
break;
}
}
}];