I use these code to show twitter dialog in iOS5 simulator
-(void)showTwitter{
TWTweetComposeViewController *tweet = [[TWTweetComposeViewController alloc] init];
[tweet setInitialText:self.textView.text];
[tweet setCompletionHandler:^(TWTweetComposeViewControllerResult result) {
if (result == TWTweetComposeViewControllerResultDone) {
NSLog(@"OK");
}
else{
NSLog(@"CANCEL");
//How to know setting button click to redirect to setting menu
//[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];
}
[self dismissModalViewControllerAnimated:YES];
}];
[self presentModalViewController:tweet animated:YES];
}
The default AlertView of twitter appear:
The problem is that when I click on Settings or Cancel button, it always go to "CANCEL". I need to catch setting button to redirect to setting menu. How to do that?