PhoneGap的WhatsApp的和 [英] PhoneGap and WhatsApp

查看:236
本文介绍了PhoneGap的WhatsApp的和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望你能帮助我找到一个问题,我的问题。

I hope you'll can help me to find an issue to my problem.

我的深化发展谁应该使用WhatsApp的应用程序。这个应用程序是使用HTML5,CSS3和JavaScript。我使用这个链接发送WhatsApp的同一个消息:

I'm developping an application who should use WhatsApp. This application is using HTML5, CSS3 and Javascript. I am using this link to send an message with WhatsApp :

<a href="whatsapp://send?text=Test 1">

这个环节的工作完全当您直接使用浏览器,但是当我使用的PhoneGap我有这样一个错误:

This link work perfectly when you use directly a browser but when I use PhoneGap I have a error like this :

网:: ERR_UNKNOWN_URL_SCHEME

net::ERR_UNKNOWN_URL_SCHEME

我已经测试了一些问题,但不起作用。我也查了资料,但没有...

I have tested some issues but doesn't work. I have also checked the Documentation but nothing...

你能帮助我吗?

感谢

推荐答案

这行添加到您的config.xml

Add this line to your config.xml

<access origin="whatsapp:*" launch-external="yes" />

或者使用社交分享插件

Or use the social sharing plugin

<一个href=\"https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin\">https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin

<button onclick="window.plugins.socialsharing.shareViaWhatsApp('Message via WhatsApp', null /* img */, null /* url */, function() {console.log('share ok')}, function(errormsg){alert(errormsg)})">msg via WhatsApp (with errcallback)</button>

这篇关于PhoneGap的WhatsApp的和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆