一键分享的实现方法

1 借助第三方代码
http://www.shareto.com.cn/getcode.html
http://www.jiathis.com/getcode/等
效果如图示:

2 优酷分享为例

源码:
<!--转贴-->
<div class="transArea">
<div class="links" onmouseout="this.className='links'" onmouseover="this.className='links links_hover'" class="links">
<div class="handle"></div>
<span class="label">转贴到:</span>
<span class="icos">
<a title="转发至QQ空间" charset="400-03-8" id="s_qq" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=http://v.youku.com/v_show/id_XMjUyMTYwNTM2.html" target="_blank"><img src="http://static.youku.com/v1.0.0647/v/img/ico_Qzone.gif" /></a>
<a title="转发至新浪微博" charset="400-03-10" id="s_sina" href="http://v.t.sina.com.cn/share/share.php?appkey=2684493555&url=http://v.youku.com/v_show/id_XMjUyMTYwNTM2.html&title=%E5%A4%9A%E5%9B%BD%E7%A9%BA%E8%A2%AD%E5%88%A9%E6%AF%94%E4%BA%9A%EF%BC%9A%E6%B3%95%E5%9B%BD%E7%8E%87%E5%85%88%E5%AF%B9%E5%8D%A1%E6%89%8E%E8%8F%B2%E5%86%9B%E9%98%9F%E5%8F%91%E5%8A%A8%E7%A9%BA%E8%A2%AD+%5B%E7%9C%8B%E4%B8%9C%E6%96%B9%5D&source=%E4%BC%98%E9%85%B7%E7%BD%91&sourceUrl=http%3A%2F%2Fwww.youku.com%2F&content=utf8&pic=http://g2.ykimg.com/01270F1F464D853FA53D1E00000000DDF86D3B-7E4D-9932-191D-A18FAF108505" target="_blank"><img src="http://static.youku.com/v1.0.0647/v/img/ico_sina.gif" /></a>
</div>
应该是使用qq空间,新浪微博等提供的开放平台API完成的
如:开心网开放平台http://www.kaixin001.com/platform/
腾讯开放平台  http://open.t.qq.com/resource.php?i=2,0
人人网开放平台 http://dev.renren.com/

你可能感兴趣的:(html,PHP,qq,新浪微博,腾讯)