介绍
小编给大家分享一下小程序开发中如何实现分享朋友圈,希望大家阅读完这篇文章之后都有所收获、下面让我们一起去探讨吧!
& lt; script 类型=拔谋?javascript"比; , document.addEventListener (& # 39; WeixinJSBridgeReady& # 39;,, function onBridgeReady (), { , window.shareData =, { , “imgUrl":“/index . php/图像/jp_1.jpg" , “timeLineLink":,“http://dc.exweixin.com/index.php?app=RedPacket& mod=Index&行动=robSmallRed& fatherid={$ fatherid}“,//好友 , “sendFriendLink":,“http://dc.exweixin.com/index.php?app=RedPacket& mod=Index&行动=robSmallRed& fatherid={$ fatherid}“,//朋友圈 , “weiboLink":““, , “tTitle":“标题!“, , “tContent":,“内容“, , “fTitle":,“!“, , “fContent":,“!“, , “wContent":,““ , }; ,//,发送给好友 , WeixinJSBridge.on(& # 39;菜单:分享:appmessage& # 39;,, function (argv), { , WeixinJSBridge.invoke (& # 39; sendAppMessage& # 39;,, { , “img_url": window.shareData.imgUrl, , “img_width":,“640”, , “img_height":,“640”, , “link": window.shareData.sendFriendLink, , “desc": window.shareData.fContent, , “title": window.shareData.fTitle , },,function (res), { , _report (& # 39; send_msg& # 39;,, res.err_msg); , }) , }); ,//,分享到朋友圈 , WeixinJSBridge.on(& # 39;菜单:分享:时间# 39;,,function (argv), { , WeixinJSBridge.invoke (& # 39; shareTimeline& # 39;,, { , “img_url": window.shareData.imgUrl, , “img_width":,“640”, , “img_height":,“640”, , “link": window.shareData.timeLineLink, , “desc": window.shareData.tContent, , “title": window.shareData.tTitle , },,function (res), { , _report(& # 39;时间# 39;,,res.err_msg); , }); , }); ,//,分享到微博 , WeixinJSBridge.on(& # 39;菜单:分享:新浪微博# 39;,,function (argv), { , WeixinJSBridge.invoke (& # 39; shareWeibo& # 39;,, { , “content": window.shareData.wContent, , “url": window.shareData.weiboLink, , },,function (res), { , _report(& # 39;微博# 39;,,res.err_msg); , }); , }); , },,假) , & lt;/script>
看完了这篇文章,相信你对“小程序开发中如何实现分享朋友圈”有了一定的了解,如果想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!