diff --git a/sample/DemoApp/Classes/DemoAppViewController.m b/sample/DemoApp/Classes/DemoAppViewController.m index 3c704b04e4..ff4136fd10 100644 --- a/sample/DemoApp/Classes/DemoAppViewController.m +++ b/sample/DemoApp/Classes/DemoAppViewController.m @@ -257,7 +257,7 @@ - (void)request:(FBRequest*)request didLoad:(id)result{ /** * Called when a UIServer Dialog successfully return */ -- (void)dialogDidSucceed:(FBDialog*)dialog{ +- (void)dialogDidComplete:(FBDialog*)dialog{ [self.label setText:@"publish successfully"]; } diff --git a/src/FBDialog.h b/src/FBDialog.h index 2936a98678..35b84412e2 100644 --- a/src/FBDialog.h +++ b/src/FBDialog.h @@ -127,27 +127,27 @@ /** * Called when the dialog succeeds and is about to be dismissed. */ -- (void)dialogDidSucceed:(FBDialog *)dialog; +- (void)dialogDidComplete:(FBDialog *)dialog; /** * Called when the dialog succeeds with a returning url. */ -- (void)dialogSucceedWithUrl:(NSURL *)url; +- (void)dialogCompleteWithUrl:(NSURL *)url; /** * Called when the dialog get canceled by the user. */ -- (void)dialogCancelWithUrl:(NSURL *)url; +- (void)dialogDidNotCompleteWithUrl:(NSURL *)url; /** * Called when the dialog is cancelled and is about to be dismissed. */ -- (void)dialogDidCancel:(FBDialog*)dialog; +- (void)dialogDidNotComplete:(FBDialog *)dialog; /** * Called when dialog failed to load due to an error. */ -- (void)dialog:(FBDialog*)dialog didFailWithError:(NSError*)error; +- (void)dialog:(FBDialog*)dialog didFailWithError:(NSError *)error; /** * Asks if a link touched by a user should be opened in an external browser. @@ -159,6 +159,6 @@ * should hold onto the URL and once you have received their acknowledgement open the URL yourself * using [[UIApplication sharedApplication] openURL:]. */ -- (BOOL)dialog:(FBDialog*)dialog shouldOpenURLInExternalBrowser:(NSURL*)url; +- (BOOL)dialog:(FBDialog*)dialog shouldOpenURLInExternalBrowser:(NSURL *)url; @end diff --git a/src/FBDialog.m b/src/FBDialog.m index 49511301c4..8b3c51bbc5 100644 --- a/src/FBDialog.m +++ b/src/FBDialog.m @@ -597,12 +597,12 @@ - (void)show { - (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated { if (success) { - if ([_delegate respondsToSelector:@selector(dialogDidSucceed:)]) { - [_delegate dialogDidSucceed:self]; + if ([_delegate respondsToSelector:@selector(dialogDidComplete:)]) { + [_delegate dialogDidComplete:self]; } } else { - if ([_delegate respondsToSelector:@selector(dialogDidCancel:)]) { - [_delegate dialogDidCancel:self]; + if ([_delegate respondsToSelector:@selector(dialogDidNotComplete:)]) { + [_delegate dialogDidNotComplete:self]; } } @@ -625,15 +625,15 @@ - (void)dialogWillDisappear { - (void)dialogDidSucceed:(NSURL *)url { - if ([_delegate respondsToSelector:@selector(dialogSucceedWithUrl:)]) { - [_delegate dialogSucceedWithUrl:url]; + if ([_delegate respondsToSelector:@selector(dialogCompleteWithUrl:)]) { + [_delegate dialogCompleteWithUrl:url]; } [self dismissWithSuccess:YES animated:YES]; } - (void)dialogDidCancel:(NSURL *)url { - if ([_delegate respondsToSelector:@selector(dialogCancelWithUrl:)]) { - [_delegate dialogCancelWithUrl:url]; + if ([_delegate respondsToSelector:@selector(dialogDidNotCompleteWithUrl:)]) { + [_delegate dialogDidNotCompleteWithUrl:url]; } [self dismissWithSuccess:NO animated:YES]; } diff --git a/test/UnitTest/Classes/UnitTestViewController.m b/test/UnitTest/Classes/UnitTestViewController.m index 581156338a..c88459abca 100644 --- a/test/UnitTest/Classes/UnitTestViewController.m +++ b/test/UnitTest/Classes/UnitTestViewController.m @@ -296,7 +296,7 @@ - (void)request:(FBRequest*)request didFailWithError:(NSError*)error{ /////////////////////////////////////////////////////////////////////////////////////////////////// // FBDialogDelegate -- (void)dialogSucceedWithUrl:(NSURL *)url { +- (void)dialogCompleteWithUrl:(NSURL *)url { NSString *post_id = [self getStringFromUrl:[url absoluteString] needle:@"post_id="]; if (post_id.length > 0) {