简体   繁体   English

从第三方iOS应用程序打开Flickr

[英]Open Flickr From Third Party iOS App

I want to forward my users to the Flickr app -if they have it of course- and if they don't to Flickr mobile. 我想将我的用户转发到Flickr应用程序 - 如果他们当然拥有它 - 如果他们不使用Flickr移动版。 I want to make sure that they will see my page. 我想确保他们会看到我的页面。 I can do this with Facebook and Twitter by a link like twitter://... However, I don't know the link style of Flickr. 我可以通过像twitter这样的链接在Facebook和Twitter上做这个... //但是,我不知道Flickr的链接风格。 Can someone help me. 有人能帮我吗。 Thanks you! 谢谢!

What you're thinking of is called a URL-Scheme. 你想到的是一个URL-Scheme。 I trying to look up the info, but I think that the developers at Flickr didn't think this through. 我试图查找信息,但我认为Flickr的开发人员并没有想到这一点。 An example post of my search is right here . 我搜索的一个示例帖子就在这里

It seems that Flickr only has the flickr:// scheme, which opens the app, but not more than that. 似乎Flickr只有flickr://方案,它可以打开应用程序,但不会超过这个。 It's a shame. 这是一个耻辱。

The new version has flickr://photos/username/photoID . 新版本有flickr://photos/username/photoID You can either use the username or nsid. 您可以使用用户名或nsid。 Both work. 两者都有效。

Currently, the way to solve this is to open the web URL. 目前,解决此问题的方法是打开Web URL。 The website will redirect you to the app if it's installed. 如果安装了该网站,该网站会将您重定向到该应用。

More on this here: https://www.flickr.com/services/api/misc.urls.html 更多相关内容: https//www.flickr.com/services/api/misc.urls.html

Example in Objective-C: Objective-C中的示例:

                                                           //Photo owner id/photo id
NSString *flickrUrlString = @"https://www.flickr.com/photos/12037949754@N01/155761353";
NSURL *flickrUrl = [[NSURL alloc] initWithString: flickrUrlString];
if ([[UIApplication sharedApplication] canOpenURL:flickrUrl]) {
    [[UIApplication sharedApplication] openURL:flickrUrl];
} else {
    NSLog(@"Unable to open url: %@", flickrUrl);
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM