问题
I am trying to open, linkedin app from my ios app
. It is getting opened but with the user's home page. I want it to open with some profile. How can i send the profile id or name with custom url.
回答1:
try this:
NSString *actionUrl = @"linkedin://#profile/52458178";
NSString *actionUrlWeb = @"http://www.linkedin.com/in/chetankedawat";
BOOL canOpenURL = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:actionUrl]];
if (canOpenURL){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:actionUrl]];
} else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:actionUrlWeb]];
}
来源:https://stackoverflow.com/questions/25970370/custom-url-link-for-linked-in-app