kiinlam
2/5/2015 - 8:25 AM

share to sina weibo qqzone qq

share to sina weibo qqzone qq

##sina weibo: http://open.weibo.com/wiki/ShareCode##
"http://service.weibo.com/share/share.php?url=' + encodeURIComponent('your link string here') + '&pic=' + ('your pic string here') + '&title=' + encodeURIComponent('your text string here') + '&ralateUid=' + ('your ralateUid string here')"

eg:
http://service.weibo.com/share/share.php?url=http%3A%2F%2Fm.cai88.com%2Findex.html&pic=http://r.cai88.com/images/ca-pic.png&title=%E5%BD%A988%E5%B8%A6%E4%BD%A0%E8%A3%85B%E5%B8%A6%E4%BD%A0%E9%A3%9E&ralateUid=3033894863

return ==>
text: 彩88带你装B带你飞 (分享自 @彩88彩票)
link: http://t.cn/8kmuMQI

##qqzone: http://connect.qq.com/intro/share##
(function(){
var p = {
  url:location.href,  /*分享的链接地址*/
  desc:'',            /*默认分享理由(可选)*/
  summary:'',         /*分享摘要(可选)*/
  title:'',           /*分享标题(可选)*/
  site:'',            /*分享来源 如:腾讯网(可选)*/
  pics:''             /*分享图片的路径(可选)*/
};
var s = [];
for(var i in p){
  s.push(i + '=' + encodeURIComponent(p[i]||''));
}
document.write(['<a version="1.0" class="qzOpenerDiv" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?',s.join('&'),'" target="_blank">分享</a>'].join(''));
})();

##qq: http://connect.qq.com/intro/sharetoqq##
(function(){
var p = {
  url:location.href,  /*获取URL,可加上来自分享到QQ标识,方便统计*/
  desc:'',            /*分享理由(风格应模拟用户对话),支持多分享语随机展现(使用|分隔)*/
  title:'',           /*分享标题(可选)*/
  summary:'',         /*分享摘要(可选)*/
  pics:'',            /*分享图片(可选)*/
  flash: '',          /*视频地址(可选)*/
  site:''             /*分享来源(可选) 如:QQ分享*/
};
var s = [];
for(var i in p){
  s.push(i + '=' + encodeURIComponent(p[i]||''));
}
document.write(['<a class="qcShareQQDiv" href="http://connect.qq.com/widget/shareqq/index.html?',s.join('&'),'" target="_blank">分享到QQ</a>'].join(''));
})();