0
我一直在试图让Tweetbot在用户点击表格行时打开用户帐户。但是,虽然Tweetbot打开,但它不显示用户帐户。我一直在使用Tweetbot URL Scheme page作为参考。Tweetbot URL计划不能打开用户
下面是我的代码:
if (indexPath.row == 1) {
// Removed the actual username
self.destViewURL = @"http://twitter.com/dummyusername";
self.destViewTitle = @"Twitter";
// URLs to try
NSURL *twitterURL = [NSURL URLWithString:@"twitter://user?screen_name= dummyusername"];
NSURL *tweetbotURL = [NSURL URLWithString:@"tweetbot://dummyusername/timeline"];
// Check if Tweetbot is available to open it
if ([[UIApplication sharedApplication] canOpenURL:tweetbotURL]) {
[[UIApplication sharedApplication] openURL:tweetbotURL];
}
else {
// Check if Twitter is available to open it
if ([[UIApplication sharedApplication] canOpenURL:twitterURL]) {
[[UIApplication sharedApplication] openURL:twitterURL];
}
// Otherwise open it in the web view
else {
[self performSegueWithIdentifier:@"showWebView" sender:nil];
}