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)