新浪微博分享接口(网页版)
1、JS
<script type="text/javascript"> function Tosinaweibo() { var PicURL = document.getElementById('img1').src; // var _t = encodeURI(document.title); var _t = encodeURI("您也来参与一下,一起为中国奥运健儿加油吧!"); // var _url = encodeURIComponent(document.location); //var _url = encodeURIComponent("http://www.xxxx.com"); var _appkey = encodeURI("333333"); //你从微薄获得的appkey var _pic = PicURL; var _site = ''; //你的网站地址 var _u = ' http://service.weibo.com/share/share.php?pic=' + _pic + '&appkey=' + _appkey + '&title=' + _t; window.open(_u, '', 'width=600, height=450, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no'); } </script>
2、HTML
<input id="Button2" type="button" value="一键分享" onclick="javascript:Tosinaweibo();" />