如何在iOS7中从whatsapp返回到我的应用程序
我听说过URL方案,但在Whatsapp打开后,我无法返回到我的应用程序 我引用了这个链接 下面是我复制到我的应用程序中的代码片段:如何在iOS7中从whatsapp返回到我的应用程序,ios7,whatsapp,Ios7,Whatsapp,我听说过URL方案,但在Whatsapp打开后,我无法返回到我的应用程序 我引用了这个链接 下面是我复制到我的应用程序中的代码片段: NSString * msg = @"YOUR MSG"; NSString * urlWhats = [NSString stringWithFormat:@"whatsapp://send?text=%@",msg]; NSURL * whatsappURL = [NSURL URLWithString:[urlWhats stringByAddingPerc
NSString * msg = @"YOUR MSG";
NSString * urlWhats = [NSString stringWithFormat:@"whatsapp://send?text=%@",msg];
NSURL * whatsappURL = [NSURL URLWithString:[urlWhats stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
} else {
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"WhatsApp installed." message:@"Your device has WhatsApp installed." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
除非Whatsapp在其应用程序中给出了一种机制,否则这是不可能的。Facebook SDK允许用户切换b/w Facebook应用进行验证并切换回。使用网页上提供的第二种方法如何