|
这是我写的代码
function success(result) {
alert(JSON.stringify(result));
}
function error(result) {
alert(JSON.stringify(result));
}
navigator.weixin.share({
message : {
title : "WeX5开发指南",
description : "分享到微信",
mediaTagName : "Media Tag Name(optional)",
thumb : "http://YOUR_THUMBNAIL_IMAGE",
media : {
// type: weixin.Type.WEBPAGE, // webpage
webpageUrl : window.location.href
// webpage
}
},
scene : navigator.weixin.Scene.TIMELINE
}, success, error); |
|