Share and forward javascript-WeChat to a friend. The description is the URL.

Source: Internet
Author: User
The expected result is as follows: an Adaptive Page is created. After the page is opened and forwarded to a friend, the title is displayed, but the image and description are not displayed. The solution on the internet is: The image must be larger than 300X300, and the image is the first image. However, I cannot ensure that the content contains images. So quasi...

The expected result is as follows:

Currently, an adaptive page is created. After you open this page and forward it to a friend, the title is displayed, but the image and description are not displayed.

The online solution is:
The image must be larger than 300X300 and be the first image. However, I cannot ensure that the content contains images. Therefore, when no image is prepared, use a default image instead.

The description is read as long as there is content in the meta description of the page. It is useless.


  

Reply content:

The expected result is as follows:

Currently, an adaptive page is created. After you open this page and forward it to a friend, the title is displayed, but the image and description are not displayed.

The online solution is:
The image must be larger than 300X300 and be the first image. However, I cannot ensure that the content contains images. Therefore, when no image is prepared, use a default image instead.

The description is read as long as there is content in the meta description of the page. It is useless.


  

JSSDK is required, and the backend partner is required

Wx. ready (function () {// get the "share to friends" button click status and custom sharing content interface wx. onMenuShareTimeline ({title: "title", // share title link: "url", imgUrl: "sharePic.jpg", // share icon success: function (res ){}}); // obtain the "share to friend" button and customize the sharing content interface wx. onMenuShareAppMessage ({title: "title", // share title link: "url", imgUrl: "sharePic.jpg", // share icon desc: 'description ', // share description type: 'link', // share type, such as music, video, or link. If this parameter is not specified, the default value is link success: function (res ){}});});

Jweixin. js needs to be loaded
URL:
Http://qydev.weixin.qq.com/wiki/index.php? Title = % E5 % BE % AE % E4 % BF % A1JS % E6 % 8E % A5 % E5 % 8F % A3

Then, call the following sharing API to share the information .. I am really lazy ..

Backend cooperation is required. Here are two simple demos I pulled earlier:
Https://github.com/wjfz/weixin-jssdk

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.