共享的WhatsApp的链接,从移动网站(不应用)为Android [英] Sharing link on WhatsApp from mobile website (not application) for Android

查看:730
本文介绍了共享的WhatsApp的链接,从移动网站(不应用)为Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个网站,该网站主要用于移动电话。 我想允许用户直接从网页共享信息到WhatsApp的

I have developed a website which is mainly used in mobile phones. I want to allow users to share information directly from the web page into WhatsApp

使用的UserAgent检测我可以Android和iOS之间的区别。 我能够发现,为了实现上述iOS中,我可以使用的网址:

Using UserAgent detection I can distinguish between Android and iOS. I was able to discover that in order to implement the above in iOS I can use the URL:

href="whatsapp://send?text=http://www.mydomain.com"

我还在寻找解决方案时,操作系统是Android的使用(如上述方法无效)。我想这是一些如何与在Andorid的使用意图,但我无法弄清楚如何做到这一点的参数HREF。

I'm still looking for the solution to be used when the OS is Android (as the above doesn't work). I guess it is some how related to using "intent" in Andorid but I couldn't figure out how to do it as parameter for href.

在此先感谢

推荐答案

刚刚看到它的网站上,似乎与最新的Chrome和WhatsApp的工作,最新的Andr​​oid现在呢!给的链接一个新的镜头!

Just saw it on a website and seems to work on latest Android with latest chrome and whatsapp now too! Give the link a new shot!

<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share">Share via Whatsapp</a>

Recheckt今天(17 2015年4月):对我的作品在iOS 8(iPhone 6最新版本)的Andr​​oid 5(Nexus的5,最新版本)

Recheckt it today (17th April 2015): Works for me on ios 8 (iPhone 6, latest versions) Android 5 (Nexus 5, latest versions)

这篇关于共享的WhatsApp的链接,从移动网站(不应用)为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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