Home WeChat Applet WeChat Development Summary of solutions to common problems encountered when developing JS-SDK 6.0.2 on WeChat

Summary of solutions to common problems encountered when developing JS-SDK 6.0.2 on WeChat

Mar 15, 2017 pm 05:28 PM

This article mainly introduces "WeChat WeChatJS-SDK 6.0.2 Encountered Problems", mainly related to WeChat WeChat JS-SDK 6.0.2 pit filling notes, for WeChat WeChat Students who are interested in filling in the pit notes of JS-SDK 6.0.2 can refer to it.

0. Why can you modify the sharing description and other information without the hassle of configuration in the past, but now it can’t be done.

Because there was no permission verification before version 6.0.2, so the config is all ok , but this does not mean that the signature in your config is OK. Please check whether the correct signature is generated in 6.0.2 to ensure that the config is OK in higher versions.

So now you need to configure the correct signature wx.config

1. Log in to the WeChat backend (mp.weixin.qq.com)-->Basic configuration

Get AppID,AppSecret

2. Get access_token

https://api.weixin.qq.com/cgi-bin /token?grant_type=client_credential&appid=APPID&secret=APPSECRET

3. Get ticket

https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token =&type=jsapi

4. Get other required items in wx.config --> signature

4.1 Reference document: nonceStr can be customized, time stamp takes the current timestamp, and the url requires the complete address.
http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=jsapisign

5 .config reports an error

5.1 "invalid url domain" You need to confirm that the domain name has been bound --> fill in "JS" in the "Function Settings" of "Official Account Settings" InterfaceSecurityDomain Name". (The file is overwritten to the project root directory)

5.2 "invalid signature" For details, please refer to Appendix 5

6. Sample code

/personal/invite. html or official please see Appendix 6

Attached is the official js-sdk documentation

http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html

Thanks for reading, I hope this helps everyone, and thank you for your support of this site!

The above is the detailed content of Summary of solutions to common problems encountered when developing JS-SDK 6.0.2 on WeChat. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)