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

高洛峰
Release: 2017-03-15 17:28:44
Original
1758 people have browsed it

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!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!