Whatsapp
allows you to link to a new message via
<a href="whatsapp://send?text=The text to share!" data-action="share/whatsapp/share" class="Share-link m-whatsapp">
How do I do the same thing with WeChat
?
WeChat does have a URI scheme that can be used from a browser. The scheme prefix is weixin://
.
There are a few URIs that can be used with this:
weixin://dl/stickers
weixin://dl/settings
weixin://dl/posts
weixin://dl/moments
However, in answer to your question specifically, there is one where you can chat to a contact specifically:
weixin://dl/chat?{toID}
You will need to replace {toID}
with whatever the destination user's WeChat ID is.
For reference's sake, these are the URLs that I've found this information from previously:
Weixin released an update 6.3.25 on 2016-09-05, which blocks almost all URL schemes request from non-weixin's application. Only requests from weixin's applications and some "white-listed" applications are allowed.
微信在 2016 年 9 月 5 日的 6.3.25 更新中,已经屏蔽了绝大部分外部发起的 URL Scheme 请求,只允许在微信内部或少量白名单应用中进行调用。鉴此,以下所展示的内容目前可能已经失效,本文仅供存档参考。
Translated from a mainland china's developer blog:
Source: https://spacekid.me/weixin-url-schemes/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With