Open Flickr From Third Party iOS App

喜你入骨 提交于 2019-12-12 00:41:39

问题


I want to forward my users to the Flickr app -if they have it of course- and if they don't to Flickr mobile. 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. Can someone help me. Thanks you!


回答1:


What you're thinking of is called a URL-Scheme. I trying to look up the info, but I think that the developers at Flickr didn't think this through. 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. It's a shame.




回答2:


The new version has flickr://photos/username/photoID. You can either use the username or nsid. Both work.




回答3:


Currently, the way to solve this is to open the 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

Example in 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);
}


来源:https://stackoverflow.com/questions/18576285/open-flickr-from-third-party-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!