Skip to content

Instantly share code, notes, and snippets.

@programus
Created March 4, 2012 11:32
Show Gist options
  • Save programus/1972564 to your computer and use it in GitHub Desktop.
Save programus/1972564 to your computer and use it in GitHub Desktop.
Sina weibo share button source generated by system.
<script type="text/javascript" charset="utf-8">
(function(){
var _w = 86 , _h = 50;
var param = {
url:location.href,
type:'6',
count:'1', /**是否显示分享数,1显示(可选)*/
appkey:'', /**您申请的应用appkey,显示分享来源(可选)*/
title:'', /**分享的文字内容(可选,默认为所在页面的title)*/
pic:'', /**分享图片的路径(可选)*/
ralateUid:'1098907490', /**关联用户的UID,分享微博会@该用户(可选)*/
language:'zh_cn', /**设置语言,zh_cn|zh_tw(可选)*/
rnd:new Date().valueOf()
}
var temp = [];
for( var p in param ){
temp.push(p + '=' + encodeURIComponent( param[p] || '' ) )
}
document.write('<iframe allowTransparency="true" frameborder="0" scrolling="no" src="http://hits.sinajs.cn/A1/weiboshare.html?' + temp.join('&') + '" width="'+ _w+'" height="'+_h+'"></iframe>')
})()
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment