Why do we need WeChat JS SDK?

Image for post
Image for post

Well, maybe you don’t need to use it. Here are the list of benefits that WeChat JS SDK provides.

What is WeChat JSSDK?

WeChat JSSDK is a bridge between a website and WeChat native app. It allows a website to do more in WeChat.

Why do we need WeChat JS SDK?

As you might have already know, WeChat has its own special environment for development. Not only its within Chinese internet, it’s tightly control by its company, Tencent. Which means, we will have to play by its rule when doing development in WeChat.

Reason #1: Sharing customization

Image for post
Image for post

While there are some hacks to use meta tags to share from other browser to WeChat to get the customized sharing card. Its limitation is when sharing is happening within WeChat. WeChat JS SDK will let you define how your sharing card would look.

Here are the list of share related JS API:

onMenuShareTimeline — When user shares to “moment” in their WeChat

onMenuShareAppMessage — When user shares to friend or a chat group

onMenuShareQQ — When user shares to QQ

onMenuShareWeibo — When user shares to Weibo

onMenuShareQZone — When user shares to QZone.

As you might notice, all of the share destinations are Tencent companies.

Reason #2 Native WeChat App Access

Because WeChat is a native app, so it has access to user’s hardware. Microphone, camera, and GPS.

You could ask user to record a message, or scan a QR code, or using GPS to find the nearest store, etc.

What I think it’s cool is that it provides you a voice translation api, so it’s really helpful for foreign user, and it can potentially be used to do something cool.

Here is the list:



















Reason #3: Manage how the menu looks

Image for post
Image for post

Here are a list of menu options:

Expose: “menuItem:exposeArticle”

Set font: “menuItem:setFont”

Day Mode: “menuItem:dayMode”

Night Mode: “menuItem:nightMode”

Refresh: “menuItem:refresh”

View Official account (added): “menuItem:profile”

View Official account (not added): “menuItem:addContact”

Send to friends: “menuItem:share:appMessage”

Share to moments: “menuItem:share:timeline”

Share to QQ “menuItem:share:qq”

Share to Weibo: “menuItem:share:weiboApp”

Favorite: “menuItem:favorite”

Share to FB: “menuItem:share:facebook”

Share to QZone/menuItem:share:QZone

Edit tags: “menuItem:editTag”

Delete: “menuItem:delete”

Copy URL: “menuItem:copyUrl”

Original Page “menuItem:originPage”

Reading Mode: “menuItem:readMode”

Open with QQ Browser: “menuItem:openWithQQBrowser”

Open with Safari: “menuItem:openWithSafari”

Email: “menuItem:share:email”

Some special official account: “menuItem:share:brand”

Reason #4:Access to WeChat Pay and Cards

Although you would have to apply for it. WeChat pay and cards would be really useful for e-commerce. As mobile payment is already engrained in the user habit in China, WeChat also let you manage discount cards or royalty cards. If you want user to sign up for membership and drive more sales online, this will be helpful to look into.

Here are the list:






If you don’t need any of these functions, you probably don’t need to spend time implementing Wechat JSSDK into your website.

Thanks for reading. Let me know what else you would like to know in the comment below.

WeChat official account platform:


WeChat JSSDK Document:


Written by

Software Freelancer based in Shanghai. More articles at https://shanghaicoders.com Work with me: https://davidyu37.github.io/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store