web分享QQ好友、QQ空间、新浪微博的api接口

QZone

"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESC}}&summary={{SUMMARY}}&site={{SOURCE}}&pics={{IMAGE}}"

QQ

"http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESC}}&pics={{IMAGE}}&summary={{SUMMARY}}"

新浪微博

"http://service.weibo.com/share/mobile.php?url={{URL}}&title={{DESC}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}"

上面大括号部分应用中请替换成实际要分享的数据。

可以自定义一个方法通过 window 来打开一个新窗口展示分享页面:

1 var sharetoqq=function(content,url,picurl)  
2 {  
3  var shareqqstring='http://v.t.qq.com/share/share.php?title='+content+'&url='+url+'&pic='+picurl;  
4  window.open(shareqqstring,'newwindow','height=100,width=100,top=100,left=100');  
5 } 
原文地址:https://www.cnblogs.com/xlljay/p/6423048.html