WeChat JS-sdk sharing to the circle of friends is invalid

Source: Internet
Author: User
The code is as follows: {code...} other interfaces can be used for testing. it is invalid to send the code to a friend or share it with a friend .. In my testing environment, IOS8.1 and version 6.02, sharing with my colleague's mobile phone (IOS6) on the same website can be triggered successfully. After debugging your mobile phone for half a day, the code is as follows:

Wx. ready (function () {wx. onMenuShareTimeline ({title: 'WeChat-php-sdk blog', desc: 'Public platform php development kit, Refine interface operations, and support chain calls. Project creator: dodgepudding Project address: https://github.com/dodgepudding/wechat-php-sdk', link: 'http: // binsee. github. io/wechat-php-sdk/', imgUrl: 'http: // binsee. github. io/wechat-php-sdk/img/author.jpg ', trigger: function (res) {alert ("Click to share:" + JSON. stringify (res); // callback function executed after the user confirms the sharing}, success: function (res) {alert ("shared successfully:" + JSON. stringify (res); // callback function executed after the user confirms the sharing}, cancel: function (res) {alert ("cancel sharing:" + JSON. stringify (res); // callback function executed after the user cancels the sharing}, fail: function (res) {alert ("sharing failed:" + JSON. stringify (res ));}});});

If other interfaces can be used for testing, it is invalid to send this information to friends and share it with friends ..
IOS8.1, version 6.02,
Sharing on the same website with a colleague's mobile phone (IOS6) can be triggered successfully. After debugging your mobile phone for half a day, you can't do it...
Has anyone ever encountered a similar situation.

Reply content:

The code is as follows:

Wx. ready (function () {wx. onMenuShareTimeline ({title: 'WeChat-php-sdk blog', desc: 'Public platform php development kit, Refine interface operations, and support chain calls. Project creator: dodgepudding Project address: https://github.com/dodgepudding/wechat-php-sdk', link: 'http: // binsee. github. io/wechat-php-sdk/', imgUrl: 'http: // binsee. github. io/wechat-php-sdk/img/author.jpg ', trigger: function (res) {alert ("Click to share:" + JSON. stringify (res); // callback function executed after the user confirms the sharing}, success: function (res) {alert ("shared successfully:" + JSON. stringify (res); // callback function executed after the user confirms the sharing}, cancel: function (res) {alert ("cancel sharing:" + JSON. stringify (res); // callback function executed after the user cancels the sharing}, fail: function (res) {alert ("sharing failed:" + JSON. stringify (res ));}});});

If other interfaces can be used for testing, it is invalid to send this information to friends and share it with friends ..
IOS8.1, version 6.02,
Sharing on the same website with a colleague's mobile phone (IOS6) can be triggered successfully. After debugging your mobile phone for half a day, you can't do it...
Has anyone ever encountered a similar situation.

1. confirm that you have been authenticated. the background displays that you have the relevant permissions.

2. make sure you have set a security domain name in the background.

3, https://github.com/wjfz/weixin-jssdkuse this demo to test the reason for removing the device

Well, the lz number is not certified.
Only the authenticated ID can be shared.

Https://github.com/dodgepudding/wechat-php-sdk/tree/master/test/jsapi I tested with this code, other interfaces can be used, share that few cannot be used .. My account is not certified. Do I have to authenticate it?

If your Android version is used, check your version...
For versions 6.0.2.57 or earlier, it seems that the latest js-sdk version is not supported only 6.0.2.58.
If it is for IOS, it seems that my 6.0.1 version can be used.

Open debug mode to view the prompt information.

In addition, versions earlier than Android 6.0.2 and later than 6.0.2.58 can be used. if neither Android nor ios can use the sharing function, you may still have problems with your configuration.

Refer to this method: http://www.huceo.com/post/414.html

Like the landlord's code, the server has been authenticated. When sharing, only the webpage title is displayed, not the configured personalized sharing content. Guidance

I also encountered this problem, but I don't know how to solve it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.