vorrei andare con avvicinamento al di sotto ...
NSURL *twitterURL = [NSURL URLWithString:@"fb://profile/<profile_id>"];
if ([[UIApplication sharedApplication] canOpenURL:twitterURL]) {
[[UIApplication sharedApplication] openURL:twitterURL];
} else {
WebViewViewController *secondView = [self.storyboard instantiateViewControllerWithIdentifier:@"webinterface"];
secondView.headerLabel = @"Facebook";
secondView.webPath = @"https://www.facebook.com/pages/<link_for_page>";
[self.navigationController pushViewController:secondView animated:YES];
}
in WebViewViewController
ho WebView e sto aprendo collegamento là ...
fondamentalmente la sua, come se non si dispone di Twitter su iPhone, si aprirà in WebView ...
fonte
2013-08-11 18:02:49
Qualche idea su come cercare un tag hash ?? Ho provato NSURL * twitterURL = [NSURL URLWithString: [NSString stringWithFormat: @ "twitter: // search? Q =% @", hashTag]]; ma nessuna fortuna ... – Smikey
Non so scusa. Potrebbe non essere in grado di Questa non è l'intera API di Twitter solo un URLScheme per l'app. Potrebbero non aver costruito quella funzione in. –
Se il controllo fallisce (l'utente non ha installato Twitter) vorrei tornare a lanciare il profilo corrispondente/etc.su Safari –