WhatsApp链接在产品上?

对于iPhone应用程序,是否有可能在产品上有一个WhatsApp链接? 一旦链接它会通过whatsapp发送消息到我的手机号码。 请指教。

你做的任何一种方法作为tafhbuild议这是自定义的方法或作为一个iOS应用程序开发人员,我build议你去与文件交互控制器,初始化一个UIDocumentInteractionController。 这些都可以帮助你pipe理交互。 查看下面的链接了解更多信息。

(UIDocumentInteractionController *) setupControllerWithURL: (NSURL) fileURL usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate { UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL: fileURL]; interactionController.delegate = interactionDelegate; return interactionController; } 

这里

 notification = @"Your Daily Inspiration by the "; notification = [notification stringByAppendingString:@"\n"]; notification = [notification stringByAppendingString:textview.text]; NSString *whats=notification; NSString *baseURL = [NSString stringWithFormat:@"whatsapp://send?text=%@",whats]; NSURL *url = [NSURL URLWithString:[baseURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; if ([[UIApplication sharedApplication] canOpenURL: url]) { [[UIApplication sharedApplication] openURL: url]; } else { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry" message:@"You can't send a thought on Whatsapp" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; } 

使用这个代码即时通讯发送以下string在WhatsApp的

我不确定,但你应该试试这个链接 。

另外,我在github上得到了WhatsApp API,检查它可能对你有帮助。

我不确定你的意思,但也许这是你要找的: http : //www.whatsapp.com/faq/en/iphone/23559013

 NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"]; if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) { [[UIApplication sharedApplication] openURL: whatsappURL]; } 

你应该看下面的链接

http://handleopenurl.com/scheme/833

它会给你所有的应用程序的所有开放的url计划选项,你也可以注册你的应用程序。