1

I can link from my mobile website to whatsapp fairly easily and I'm looking for a way to do this with Line app. According to their instructions here http://media.line.me/howto/en/,

line://msg/<CONTENT TYPE>/<CONTENT KEY>

should work, but I'm getting a "This version of Line does not support this URL" error with this code:

<a href="line://msg/Check this out! https://www.mywebsite.com">Link</a>

Any ideas why?

sal
  • 67
  • 1
  • 9

2 Answers2

1

Ah, I forgot to specify the content type. SOLVED.

sal
  • 67
  • 1
  • 9
1

mostly, when this happens, parameter settings may be wrong, you can do like this

NSString *shareText = @"https://www.mywebsite.com";
// if you have some special characters, you need do this
// [shareText stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

NSString *urlString = [NSString stringWithFormat:@"line://msg/text/%@", shareText];
NSURL *url = [NSURL URLWithString:urlString]; 
if ([[UIApplication sharedApplication] canOpenURL:url]) {
   [[UIApplication sharedApplication] openURL:url];
}
J.Caspar
  • 21
  • 2