Javascript: WeChat sharing (QQ, circle of friends, sharing with friends) and javascript circle of friends

Source: Internet
Author: User

Share Javascript (QQ, circle of friends, share with friends), javascript circle of friends

Recently, developers have developed public accounts. Now, all of the best features are shared in the circle of friends, QQ, sharing with friends, and so on. Here we will record the sharing functions. You can also view them if you need them.

// Share var wx = require ('wechat-sdk'); rewardsResultService. getWechatInfo (). then (function (data) {var conf = data; wx. config ({debug: false, appId: 'wx34e783920b37ee91 ', timestamp: conf. timestamp, nonceStr: conf. noncestr, signature: conf. signature, jsApiList: ['onmenushareappmessage', 'onmenusharetimeline ', 'onmenushareqq']}); configWeChatInterface () ;}); var iconUrl = 'HTTP: //' + location. host + '/imag Es/icon-200yuan.png '; function configWeChatInterface () {// share with your friend wx. onMenuShareAppMessage! ', Desc:' If you don't agree, you will receive a red envelope. Tarantula will give you a 200 yuan red envelope! ', Link: location. href, imgUrl: iconUrl, type: 'link', success: function () {// alert ('share success ') ;}, cancel: function (){}}); // share it with your friends. onMenuShareTimeline! ', Link: location. href, // share link imgUrl: iconUrl}); // share it with QQ wx. onMenuShareQQ! ', // Share the title desc:' send a red envelope if it doesn't match a word, and the Golden spider will send you a 200 yuan red envelope! ', // Share description link: location. href, // share link imgUrl: iconUrl, // share icon success: function () {// callback function executed after the user confirms the sharing}, cancel: function () {// callback function executed after the user cancels the sharing }});}

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

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.