Home > Web Front-end > JS Tutorial > body text

WeChat jssdk sharing function example tutorial

零下一度
Release: 2017-06-25 09:45:13
Original
1978 people have browsed it

Premise: Call the WeChat jssdk sharing function and debug it through the WeChat developer tools. The call is normal without any error message.

Problem: The call is successful, and the developer tools display normally. However, after debugging on a real machine and sharing it, the custom content becomes invalid and becomes the default content automatically obtained by WeChat! As of the date of publication: everything is normal on the IOS side (maybe the rules on the IOS side have not changed yet), the sharing operation on the Android side is normal, and the customized content is invalid.

Reason: WeChat has readjusted the sharing rules: the sharing address must be consistent with the security domain name of the official account JS interface.

For example: Custom URL: The root address of this custom path is xxx.xxxx.com. Then the public account JS interface security domain name is xxx.xxxx.com. In this way, you can customize sharing normally.

For example: Custom URL: The root address of this custom path is xxx.xxxx.com/xxx. Then the public account JS interface security domain name is xxx.xxxx.com/xxx . In this way, you can customize sharing normally.

Note: As in the above example, the JS interface security domain name address must be the same as the root path of the custom path configuration.

The above conclusions are all based on my own self-test. Please forgive me if there are any discrepancies with others.

Others: As mentioned above, there is no problem, but the picture cannot be displayed, please refer to this article.

The above is the detailed content of WeChat jssdk sharing function example tutorial. 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