function weixinShareTimeline(title,desc,link,imgUrl){
WeixinJSBridge.invoke(‘shareTimeline’,{
「img_url」:imgUrl,
//」img_width」:」640″,
//」img_height」:」640″,
「link」:link,
「desc」: desc,
「title」:title
});
}
function weixinSendAppMessage(title,desc,link,imgUrl){
WeixinJSBridge.invoke(‘sendAppMessage’,{
//」appid」:appId,
「img_url」:imgUrl,
//」img_width」:」640″,
//」img_height」:」640″,
「link」:link,
「desc」:desc,
「title」:title
});
}
function weixinShareWeibo(title,link){
WeixinJSBridge.invoke(‘shareWeibo’,{
「content」:title + link,
「url」:link
});
}
function weixinAddContact(name){
WeixinJSBridge.invoke(「addContact」, {webtype: 「1″,username: name}, function(e) {
WeixinJSBridge.log(e.err_msg);
//e.err_msg:add_contact:added 已經添加
//e.err_msg:add_contact:cancel 取消添加
//e.err_msg:add_contact:ok 添加成功
if(e.err_msg == ‘add_contact:added’ || e.err_msg == ‘add_contact:ok’){
//關注成功,或者已經關注過
}
})
}