0

I am looking for wechat sharing function like how whatsapp does.

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

Based on my research, most of them will be encoded in QR code and scan the QR code with wechat scanner. Is there a way to share the text directly to friend when click on sharing button just like how whatsapp does?

Crazy
  • 847
  • 1
  • 18
  • 41

1 Answers1

1

Wechat doesn't have any official deep linking URL for sending a text. However, if you can add some JavaScript Code in your mobile web, you can achieve the share functionality.

Check out Send to chat documentation on Wechat JS SDK.

From JS SDK Documentation:-

wx.onMenuShareAppMessage({
    title: '', // Sharing title
    desc: '', // Sharing description
    link: '', // Sharing link
    imgUrl: '', // Sharing image URL
    type: '', // Sharing type, such as “music”, “video “ or “link”. It is “link” by default.
    dataUrl: '', // The data URL should be provided for items of type “music” or “video”. It is null by default.
    success: function () { 
        // Callback function executed after a user confirms sharing
    },
    cancel: function () { 
        // Callback function executed after a user cancels sharing
    }
});

We do have some unofficial deep linking URL like you mentioned. But it may stop work anytime if Wechat decided to change it.

Here is some of them below, sadly I don't know any URL to share a text to chat.

  • weixin:// - to open Wechat app (if installed)
  • weixin://dl/chat - to open chat screen of Wechat
  • weixin://dl/moments - to open user moements
  • weixin://dl/profile - to open user profile
  • weixin://dl/settings - to open settings page
Community
  • 1
  • 1
Bluewings
  • 3,438
  • 3
  • 18
  • 31
  • Take a look at this issue: https://stackoverflow.com/questions/35425553/how-do-i-link-to-wechat-from-a-webpage As for what it's said there, WeChat banned this URI methods to share from websites. I haven't got to share an URL to WeChat so far. But some method there must be. – ElPiter Nov 16 '17 at 08:30