GZGame 发表于 2011-3-2 23:49:13

[转载]整合分享到新浪网易微博代码

一、新浪微博分享代码:
<p><strong>&nbsp;&nbsp; 1、各网站、论坛、博客等通用代码:</strong><strong></p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px="1px"dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px="1px"dotted; BORDER-LEFT: #cccccc 1px="1px"dotted; BORDER-BOTTOM: #cccccc 1px="1px"dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#f3f3f3"><font style="FONT-WEIGHT: bold; COLOR: #990000">&lt;a href="javascript:(function(){window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(document.title)+'&amp;url='+encodeURIComponent(location.href)+'&amp;source=bookmark','_blank','width=450,height=400');})()" title="新浪微博分享"&gt;&lt;img src="http://t.sina.com.cn/favicon.ico"&nbsp; alt="新浪微博分享" border="0"&gt;分享到新浪微博&lt;/a&gt; <br/></font></td></tr></tbody></table></p>
<p>&nbsp;&nbsp; 此代码无需申请 Appkey<br/><br/>&nbsp;&nbsp;&nbsp; 2、新浪官方分享到代码:&nbsp;</strong></p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px="1px"dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px="1px"dotted; BORDER-LEFT: #cccccc 1px="1px"dotted; BORDER-BOTTOM: #cccccc 1px="1px"dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#f3f3f3"><font style="FONT-WEIGHT: bold; COLOR: #990000">&lt;a href="javascript:void((function(s,d,e,r,l,p,t,z,c){var%20f='http://v.t.sina.com.cn/share/share.php?appkey=真实的appkey',u=z||d.location,p=['&amp;url=',e(u),'&amp;title=',e(t||d.title),'&amp;source=',e(r),'&amp;sourceUrl=',e(l),'&amp;cgb2312','&amp;pic=',e(p||'')].join('');function%20a(){if(!window.open(.join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=.join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent,'','','图片链接|默认为空','标题|默认当前页标题','内容链接|默认当前页location','页面编码gb2312|utf-8默认gb2312'));"&gt;分享至微博&lt;/a&gt;&nbsp;</font></td></tr></tbody></table><br/>&nbsp;&nbsp;&nbsp; <strong>注意事项说明:&nbsp;<br/></strong>&nbsp;&nbsp;&nbsp; 此需要申请appkey帐号,地址:open.t.sina.com.cn<br/>&nbsp;&nbsp;&nbsp; 真实的appkey {string} 必选参数&nbsp;<br/>&nbsp;&nbsp;&nbsp; 图片链接 (String) 可选参数, 默认为空&nbsp;<br/>&nbsp;&nbsp;&nbsp; 标题 (String) 可选参数, 默认当前页title&nbsp;<br/>&nbsp;&nbsp;&nbsp; 内容链接 (String) 可选参数, 默认当前页location&nbsp;<br/>&nbsp;&nbsp;&nbsp; 页面编码 (String) 可选参数, 默认gb2312&nbsp;<br/>&nbsp;&nbsp;&nbsp; &lt;a&gt; 的链接样式及文字可自行据需求修改.代码中有 " %20f " 属正常代码,无需处理&nbsp;<br/><br/>&nbsp;<strong>&nbsp;&nbsp; 3、非官方正式代码:</strong>&nbsp;</p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px="1px"dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px="1px"dotted; BORDER-LEFT: #cccccc 1px="1px"dotted; BORDER-BOTTOM: #cccccc 1px="1px"dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#f3f3f3"><font style="FONT-WEIGHT: bold; COLOR: #990000">&nbsp;&nbsp;&nbsp; 1)、&lt;a href="http://v.t.sina.com.cn/share/share.php?title=%E4%BD%A0%E5%A5%BD%20hello%20world" target="_blank"&gt;分享到微博&lt;/a&gt;,简单分享(无需申请)&nbsp;<br/><br/>&nbsp;&nbsp;&nbsp; 2)、&lt;a href="http://v.t.sina.com.cn/share/share.php?appkey=4120396272&amp;title=%E4%BD%A0%E5%A5%BD%20hello%20world" target="_blank"&gt;分享到微博&lt;/a&gt;,带有AppKey(Appkey需要前往 open.t.sina.com.cn 申请)&nbsp;<br/><br/>&nbsp;&nbsp;&nbsp; 字段需要经过encodeURIComponent,例子: <br/>你好 http://t.sina.com.cn/ -&amp;gt &lt;script&gt;document.write(encodeURIComponent("你好 http://t.sina.com.cn/"));&lt;/script&gt;&nbsp;</font><br/></td></tr></tbody></table></p>
<p>&nbsp;&nbsp;&nbsp; <strong>注:Appkey需要前往 open.t.sina.com.cn 申请<br/></strong><br/><br/><strong>&nbsp;&nbsp;&nbsp; 二、网易微博分享代码&nbsp;<br/><br/>&nbsp;&nbsp;&nbsp; 1、样式一:任何网站、博客都可以调用</strong></p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px="1px"dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px="1px"dotted; BORDER-LEFT: #cccccc 1px="1px"dotted; BORDER-BOTTOM: #cccccc 1px="1px"dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#f3f3f3"><font style="FONT-WEIGHT: bold; COLOR: #990000">&lt;a href="javascript:(function(){window.open('http://t.163.com/article/user/checkLogin.do?link=http://news.163.com/&amp;source='+'土豆网'+ '&amp;info='+encodeURIComponent(document.title)+' '+encodeURIComponent(location.href),'_blank','width=510,height=300');})()" title="分享到网易微博"&gt;&lt;img src="http://www.taoba123.com/images/resource_10544871274700952v.png" alt="网易微博分享" border="0"&gt;&lt;/a&gt;&nbsp;</font></td></tr></tbody></table><br/><strong>&nbsp;&nbsp;&nbsp; 2、样式二</strong></p>
<p>
<table style="BORDER-RIGHT: #cccccc 1px="1px"dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px="1px"dotted; BORDER-LEFT: #cccccc 1px="1px"dotted; BORDER-BOTTOM: #cccccc 1px="1px"dotted" cellspacing="0" cellpadding="6" width="95%" align="center" border="0">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" bgcolor="#f3f3f3"><font style="FONT-WEIGHT: bold; COLOR: #990000">&lt;a target="_self"href="javascript:void(0);"&gt;&lt;img height="19px" border="0" align="absMiddle" src="http://img1.cache.netease.com/cnews/css09/wblog.gif" alt="分享到网易微博" title="分享到网易微博" /&gt;分享到网易微博&lt;/a&gt;</font></td></tr></tbody></table></p>
页: [1]
查看完整版本: [转载]整合分享到新浪网易微博代码