I’m trying to create a URL protocol that links to my twitter profile in iOS. But I would like it to fall back to Safari if the user does not have the Twitter app installed. How would I do that? This is the code I am using right now:
NSString *stringURL = @"twitter://user?screen_name=ecnepsnai";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
You could use the
-canOpenURL:method ofUIApplication.