Google+ iOS应用的URI方案? [英] URI scheme of Google+ iOS app?
问题描述
我正在制作一些很酷的内容,我想在iOS应用中链接到我的Google+个人资料。
I'm working on something cool and I want to link to my Google+ profile in the iOS app.
有没有人发现如何使用 mgc://
iOS上的Google+应用提供的URI方案,以 fb:// $ c $的方式打开特定的个人资料c>,
twitter://
以及几乎所有其他基于帐户的iOS应用程序?
Has anyone found out how to use the mgc://
URI scheme that the Google+ app on iOS provides to open a specific profile the way you can do it with fb://
, twitter://
and almost every other account-based iOS app?
推荐答案
事实上它真的很简单。在网络浏览器中检查您的网址,并使用 http://
或 https://
> gplus://
In fact it's really simple. Check your URL in a web browser and replace http://
or https://
with gplus://
示例:
如果浏览器中的网址是 https://plus.google.com/u/0/100711776131865357077 ,那么使用以下代码在应用程序中打开配置文件。
If the URL in your browser is https://plus.google.com/u/0/100711776131865357077 then you open the profile in the app with the following code.
NSURL *gPlusUrl = [NSURL URLWithString:@"gplus://plus.google.com/u/0/100711776131865357077"];
if ([[UIApplication sharedApplication] canOpenURL:gPlusUrl]) {
[[UIApplication sharedApplication] openURL:gPlusUrl];
}
这篇关于Google+ iOS应用的URI方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!