gpt4 book ai didi

ios - 在 iOS 应用程序中打开链接以关注 Google Plus 页面?

转载 作者:行者123 更新时间:2023-11-29 12:44:50 25 4
gpt4 key购买 nike

我想从 iOS 7 应用程序打开我的 g+ 页面。类似于我们在下面为 Facebook 和 Twitter 做的事情

- (IBAction)likeMeOnFacebook:(id)sender {
NSURL *urlApp = [NSURL URLWithString:@"fb://profile/{Enter ID Here}"];
[[UIApplication sharedApplication] openURL:urlApp];
}

- (IBAction)followMeOnTwitter:(id)sender {
NSURL *urlApp = [NSURL URLWithString:@"twitter://user?screen_name={Enter ID Here}"];
[[UIApplication sharedApplication] openURL:urlApp];
}

- (IBAction)followMeOnTwitter:(id)sender {
// Need code to open Google Plus page
// Help me out to find out the URL
NSURL *urlApp = [NSURL URLWithString:@""];
[[UIApplication sharedApplication] openURL:urlApp];
}

最佳答案

// Google +

NSURL *googlePlusURL = [[NSURL alloc] initWithString:@"gplus://plus.google.com/+Mypizza"];

// check if app is installed

if ( ! [[UIApplication sharedApplication] canOpenURL:googlePlusURL] ) {

// if we get here, we can't open the Google app.

googlePlusURL = [[NSURL alloc] initWithString:@"https://plus.google.com/+Mypizza"];
}
[[UIApplication sharedApplication] openURL:googlePlusURL];

关于ios - 在 iOS 应用程序中打开链接以关注 Google Plus 页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23927586/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com