How to set the title, thumbnail, connection and description of WeChat sharing. You will encounter this situation during the sharing process using WeChat. Friends who have no solution can take a look at the following code
<script> var imgUrl = 'http://topic.xcar.com.cn/201403/ad_q3/pic/banner.jpg'; var lineLink = 'http://topic.xcar.com.cn/201403/ad_q3/index.php'; var descContent = "http://topic.xcar.com.cn/201403/ad_q3/index.php"; var shareTitle = '[Audi Q3 starts exclusive gift season] Sign up for a test drive and win exquisite gifts'; var appid = 'wxc9937e3a66af6dc8'; function shareFriend() { WeixinJSBridge.invoke('sendAppMessage',{ "appid": appid, "img_url": imgUrl, "img_width": "640", "img_height": "640", "link": lineLink, "desc": descContent, "title": shareTitle }, function(res) { _report('send_msg', res.err_msg); }) } function shareTimeline() { WeixinJSBridge.invoke('shareTimeline',{ "img_url": imgUrl, "img_width": "640", "img_height": "640", "link": lineLink, "desc": descContent, "title": shareTitle }, function(res) { _report('timeline', res.err_msg); }); } function shareWeibo() { WeixinJSBridge.invoke('shareWeibo',{ "content": descContent, "url": lineLink, }, function(res) { _report('weibo', res.err_msg); }); } // When the built-in WeChat browser completes internal initialization, the WeixinJSBridgeReady event will be triggered. document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() { // Send to friends WeixinJSBridge.on('menu:share:appmessage', function(argv){ shareFriend(); }); // Share to WeChat Moments WeixinJSBridge.on('menu:share:timeline', function(argv){ shareTimeline(); }); // Share to Weibo WeixinJSBridge.on('menu:share:weibo', function(argv){ shareWeibo(); }); }, false); </script>