Share JS Code

Source: Internet
Author: User

                var imgurl = ' http://xxx/share_ico.png '; Share a picture shown after var linelink = ' http://xxx '; Click Share after jump page address var desccontent = "xx! "; After sharing the description information var sharetitle = ' xx '; After sharing the title var AppID = '; The app ID, if any can be filled, is left blank function sharefriend () {Weixinjsbridge.invoke ('                                Sendappmessage ', {"AppID": AppID, "Img_url": Imgurl,                                "Img_width": "$", "img_height": "200", "Link": Linelink, "desc": Desccontent, "title": Shareti Tle}, function (res) {//_report (' send_msg ', res.err_msg);//This is a callback function , must be commented out})} function Sharetimeline () {Weixinj SbridgE.invoke (' Sharetimeline ', {"Img_url": Imgurl, "img_width": "                                "," "Img_height": "" "," link ": Linelink, "desc": Desccontent, "title": Sharetitle}, function (RES)                {//_report (' timeline ', res.err_msg);//This is a callback function and must be commented out});                                } function Shareweibo () {weixinjsbridge.invoke (' Shareweibo ', { "Content": desccontent, "url": Linelink,}, Fu                        Nction (res) {//_report (' Weibo ', res.err_msg);                });                }//The Weixinjsbridgeready event is triggered when the built-in browser finishes internal initialization. Document.addeventlistener (' Weixinjsbridgeready ', function onbridgereAdy () {//Send to Friend Weixinjsbridge.on (' Menu:share:appmessage ', function (argv) {                        Sharefriend ();                        }); Share to Friends Circle Weixinjsbridge.on (' Menu:share:timeline ', function (argv) {s                        Haretimeline ();                        }); Share to Weibo Weixinjsbridge.on (' Menu:share:weibo ', function (argv) {Share                        Weibo ();                });         }, False);

  

Share JS code (GO)

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.