1
frankzeng 2014-09-09 13:31:26 +08:00 1
<script type="text/javascript">
var tit = $('#wx-title').val(); //标题 var img = $('#wx-img').val(); //图片 var con = $('#wx-con').val(); //简介 var link = $('#wx-link').val(); //链接 document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() { // 发送给好友 WeixinJSBridge.on('menu:share:appmessage', function (argv) { WeixinJSBridge.invoke('sendAppMessage', { "appid": "123", "img_url": img, "img_width": "160", "img_height": "160", "link": link, "desc": con, "title": tit }, function (res) { _report('send_msg', res.err_msg); }) }); // 分享到朋友圈 WeixinJSBridge.on('menu:share:timeline', function (argv) { WeixinJSBridge.invoke('shareTimeline', { "img_url": img, "img_width": "160", "img_height": "160", "link": link, "desc": con, "title": tit }, function (res) { _report('timeline', res.err_msg); }); }); }, false) </script> 把这一段复制到你的网页里,就好了,不过只能在微信内置浏览器里生效。 |
2
larkifly 2014-09-09 13:48:52 +08:00
sharesdk,你值得拥有
|
4
gangsta 2014-09-09 14:21:37 +08:00 1
|
5
citysheep 2015-06-15 23:15:35 +08:00
WeixinJSBridge 已经封了,可以用微信的js-sdk: http://www.bestsdk.com/forum/detail/95.html
|