2

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">

Like this how to redirect user from website to wechat miniprogram

Deepak
  • 1,373
  • 2
  • 10
  • 31

2 Answers2

2

Wechat Mini Program can only be run within 1) the wechat app installed on iOS or Android 2) Weixin DevTools. Thus it provides better user experience and also has more control over security concerns.

So the traditional 'url' ways not work for it. I tried logging in wechat both on my iphone and mac, then use my phone to share a mini program link to the mac client. Then I got a message: You sent a Mini Program. View on mobile.. So you can't even use mini program in mac's(macOS) wechat app.

Actually a mini program is mostly accessed by scanning a 'The Mini Program code'. In your case if you have a website you could embed the code on your page and ask your user to use their wechat to scan that code. You may want to check information from the official dev doc of wechat.

Xullnn
  • 405
  • 3
  • 17
0

You can use WeChat's API to generate a short link of the form https://wxaurl.cn/pFawq35qbfd: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html (in Chinese).

In the API call, you can specify a path into your miniprogram, and also pass query parameters. Clicking the link in a Whatsapp or SMS message first opens an intermediate web page in a browser. That web page then contains a button to launch the miniprogram.

Unfortunately it seems the API is not available to individual developers. You'll need a company account.

heiko
  • 422
  • 7
  • 7