网页分享到微信(好友或者朋友圈),如果想自定义配置标题、小图片、副标题,需要使用微信的 jssdk
但是,我现在要把从微博中看到的网页,二次分享到自己的微博,也想自定义配置标题、小图片、副标题,该如何做?
QQ也一样,我从QQ空间中看到的网页,二次分享到自己的QQ空间,也想自定义配置标题、小图片、副标题,该如何做?
我没有搜到微博、QQ有像微信那样的 jssdk,有遇到过这个问题的同仁吗?
网页分享到微信(好友或者朋友圈),如果想自定义配置标题、小图片、副标题,需要使用微信的 jssdk
但是,我现在要把从微博中看到的网页,二次分享到自己的微博,也想自定义配置标题、小图片、副标题,该如何做?
QQ也一样,我从QQ空间中看到的网页,二次分享到自己的QQ空间,也想自定义配置标题、小图片、副标题,该如何做?
我没有搜到微博、QQ有像微信那样的 jssdk,有遇到过这个问题的同仁吗?
var thisurl= window.location.href;
var thistitle= document.title;
var thisimg ="............jpg";
document.addEventListener('WeixinJSBridgeReady', function(){
//发送给好友
WeixinJSBridge.on('menu:share:appmessage', function(argv){
WeixinJSBridge.invoke('sendAppMessage',{
"appid":"",
"img_url":thisimg,
"img_width":"110",
"img_height":"109",
"link":thisurl,
"desc":thistitle,
"title":thistitle
}, function(res){});
});
//分享到朋友圈
WeixinJSBridge.on('menu:share:timeline', function(argv){
WeixinJSBridge.invoke('shareTimeline',{
"img_url":thisimg,
"img_width":"110",
"img_height":"109",
"link":thisurl,
"desc":thistitle,
"title":thistitle
}, function(res){});
});
//分享到微博
WeixinJSBridge.on('menu:share:weibo', function(argv){
WeixinJSBridge.invoke('shareWeibo',{
"content":thistitle,
"url":thisurl
}, function(res){});
});
});
http://share.baidu.com/code/a...
你可以看看