Open Twitter settings from the app in iOS 5.1
I use Twitter in my iPhone app, and if the user doesn't have a Twitter account, I'd like to be able to open Twitter settings from my app. Is there a way to do this in iOS 5.1?
In iOS 5.0 we could have done as shown below, but I couldn't find a way to do it in 5.1
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];
+3
source to share
2 answers
Try it.
TWTweetComposeViewController *ctrl = [[TWTweetComposeViewController alloc] init];
if ([ctrl respondsToSelector:@selector(alertView:clickedButtonAtIndex:)]) {
// Manually invoke the alert view button handler
[(id <UIAlertViewDelegate>)ctrl alertView:nil
clickedButtonAtIndex:0];
}
[ctrl release];
+3
source to share