Reputation: 80
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.
Upvotes: 0
Views: 1204
Reputation: 5065
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]];
}
Upvotes: 1