Iphone 如何打开用户';使用MobileSafari中的链接使用Twitter应用的Twitter个人资料?
看起来Twitter注册了Twitter:///的URI模式,但在使用它之后,我无法让它直接打开用户的个人资料。我试过:Iphone 如何打开用户';使用MobileSafari中的链接使用Twitter应用的Twitter个人资料?,iphone,ios,ipad,mobile,Iphone,Ios,Ipad,Mobile,看起来Twitter注册了Twitter:///的URI模式,但在使用它之后,我无法让它直接打开用户的个人资料。我试过: twitter://username twitter://user/username twitter://profile/username 没有运气。我也需要它在Android上工作 想法?似乎在任何地方都没有官方文档记录,因此我不会指望所有版本的Twitter应用程序都支持它,但给出了一个可能值得一试的提示: 我刚刚发现”twitter:///user?screen_na
twitter://username
twitter://user/username
twitter://profile/username
没有运气。我也需要它在Android上工作
想法?似乎在任何地方都没有官方文档记录,因此我不会指望所有版本的Twitter应用程序都支持它,但给出了一个可能值得一试的提示: 我刚刚发现”twitter:///user?screen_name=tvdw“同样有效
我知道你特别想用官方的Twitter应用程序打开它,但是如果这个人没有这个应用程序,那么这个功能在你的应用程序中就不起作用了
既然MGTwitterEngine对每个人都有效,而且它将保留在你的应用程序中,为什么不在这种情况下使用它呢?我发现了两种twittertweetie://和twitter://的URL方案:
tweetie:///user?screen_name=jessicaalba
twitter:///user?screen_name=jessicaalba
在这方面,您可以找到许多其他iphone url方案(包括twitter)供那些想知道如何测试方案是否执行的人使用:
- (BOOL)openURL:(NSString *)url
- (void) clickTwitter {
if (![self openURL:@"twitter:///user?screen_name=mufumbo"]) {
if (![self openURL:@"tweetie:///user?screen_name=mufumbo"]) {
[self openURL:@"http://twitter.com/mufumbo"];
}
}
}
您可以包含更多内容并使其成为通用循环。这是正确的。该网站也是定制应用程序方案的重要来源:具有讽刺意味/不幸的是,handleopenurl.com不再可用:(