0
我已經創建了在whatsapp上共享我的應用程序的代碼。問題是當共享鏈接從ios發送到android手機時,url鏈接和文本都以純文本格式顯示在android手機的whatsapp聊天框中,沒有突出顯示鏈接和網址。 這可以解決嗎?怎麼樣?iOS:使用目標的應用程序共享URL C
NSString *urlString = [NSString stringWithFormat:@"%@", APP_SHARE_URL];
NSString *initialText1 = [NSString stringWithFormat:@"Hey I am using App: %@\n%@",urlString, profileModel.name];
NSCharacterSet *set = [NSCharacterSet URLHostAllowedCharacterSet];
NSString *whatsappString = [NSString stringWithFormat:@"%@", [[NSString stringWithFormat:@"%@", initialText1] stringByAddingPercentEncodingWithAllowedCharacters:set]];
NSURL *whatsappURL = [NSURL URLWithString:[NSString stringWithFormat:@"whatsapp://send?text=%@", whatsappString]];
if ([[UIApplication sharedApplication] canOpenURL:whatsappURL]) {
[[UIApplication sharedApplication] openURL:whatsappURL];
}
else {
[self showMessage:@"Unable to open WhatsApp"];
}