转载地址: http://www.renseng.com/learning/forwarded-sina-happy-tencent-sharing-network.html

用以下代码前如有需求可申请新浪微博跟腾讯微博的APPKEY,点这里申请新浪微博,点这里申请腾讯微博,申请后即可替换以下代码中的appkey。

新浪微博分享代码:

<a  href="javascript:void((function(s,d,e){try{}catch(e){}var f='http://v.t.sina.com.cn/share/share.php?',u=d.location.href,p=['url=',e(u),'&amp;title=',e(d.title),'&amp;appkey=3486983565'].join('');function a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=620,height=450,left=',(s.width-620)/2,',top=',(s.height-450)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent)){setTimeout(a,0)}else{a()}})(screen,document,encodeURIComponent));" title="分享到新浪微博" class="s1"> </a>

腾讯微博分享代码:

<a href="javascript:void(0)" οnclick="postToWb();" close="tmblog" class="s2" title="分享到腾讯微博"></a>
<script type="text/javascript">
         function postToWb(){
       var _t = encodeURI(document.title);
       var _url = encodeURIComponent(document.location);
var _appkey = encodeURI("571330b45a5044939d9acd6abc0d0a7b");
var _pic = encodeURI('');//(例如:var _pic='图片url1|图片url2|图片url3....)
var _site = 'www.upantool.com';
var _u = 'http://v.t.qq.com/share/share.php?url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic+'&title='+_t;
window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' );
         }
</script>

搜狐微博分享代码:

<a  href="javascript:void((function(s,d,e,r,l,p,t,z,c){var f='http://t.sohu.com/third/post.jsp?',u=z||d.location,p=['&url=',e(u),'&title=',e(t||d.title),'&content=',c||'gb2312','&pic=',e(p||'')].join('');function%20a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=660,height=470,left=',(s.width-660)/2,',top=',(s.height-470)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent,'','','','','','utf-8'));" title="分享到搜狐微博" class="s3"> </a>

人人网分享代码:

<a  href="javascript:window.open('http://share.renren.com/share/buttonshare.do?title='+encodeURIComponent(document.title.substring(0,76))+'&amp;link='+encodeURIComponent(location.href)+'&amp;content=','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0" title="分享到人人网" class="s4"> </a>

开心网分享代码:

<a  href="javascript:window.open('http://www.kaixin001.com/repaste/share.php?rtitle='+encodeURIComponent(document.title.substring(0,76))+'&amp;rurl='+encodeURIComponent(location.href)+'&amp;rcontent=','_blank','scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes'); void 0" title="分享到开心网" class="s5"> </a>

豆瓣网分享代码:

<a  href="javascript:void(function(){var%20d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:' ',r='http://www.douban.com/recommend/?url='+e(d.location.href)+'&title='+e(d.title)+'&sel='+e(s)+'&v=1',x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location.href=r+'&r=1'};if(/firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()" title="分享到豆瓣网" class="s6"> </a>

转发至新浪微博、开心网、腾讯微博、人人网代码分享!相关推荐

  1. c语言微博创建转发和删除源代码,[转]QQ空间、新浪微博、腾讯微博等一键分享API链接代码...

    1.新浪微博:http://service.weibo.com/share/share.php?url= count=表示是否显示当前页面被分享数量(1显示)(可选,允许为空) &url=将页 ...

  2. 分享到QQ空间、新浪微博、腾讯微博的代码!(收藏)

    1.QQ空间分享说明 http://connect.qq.com/intro/share/ 2. QQ空间分享代码如下:<ahref="javascript:void(0);" ...

  3. 分享到新浪微博,腾讯微博,网易微博,开心,人人,豆瓣

    转载地址:http://www.cnblogs.com/bennman/archive/2011/05/28/2060910.html 1 <!DOCTYPE html PUBLIC " ...

  4. Windows Phone 社交分享SDK发布(新浪微博、腾讯微博、人人)

    update2012.7.15: 现在可以使用Nuget获取到 Alexis.WindowsPhone.Social.dll Chapter 1. Why I create Alexis.Window ...

  5. 新浪微博与腾讯微博暂停评论功能

    查看原文:http://www.hellonet8.com/795.html 新浪微博和腾讯微博暂停"评论"功能三天,这可不是"愚人节"逗你玩儿.今天上午玩微博 ...

  6. [石青微博群发软件 v2.1.8.6] 集新浪微博和腾讯微博为一体的营销工具+自动群发消息

    介绍 石青微博群发软件是一款集新浪微博.腾讯微博为一体的营销工具,几乎涵盖了所有微博营销和推广手法,是网络推广者不可多得的工具. 本软件是一款全自动的微博群发工具,包含群发.超话.私信.评论.留言.转 ...

  7. 实战新浪微博、腾讯微博的分享功能

    一个是新浪微博,腾讯微博的分享按钮,一个是他们的绑定情况(其实就是是否授权).点击微博分享中新浪或腾讯按钮,就进行相应的授权(若没授权),显示微博内容,而后发布微博.设置界面中的绑定,就是相关的应用授 ...

  8. 实战新浪微博、腾讯微博的分享功能(转)

    转载自:http://blog.csdn.net/nogodoss/article/details/17528749 我做的大概界面是如下图. 主要有两个界面,一个是新浪微博,腾讯微博的分享按钮,一个 ...

  9. 腾讯空间、新浪微博、腾讯微博登录接口

    腾讯空间.新浪微博.腾讯微博登录接口的使用. 注意:在网站对接前,请先申请注册好您的QQ登录appid.新浪登录Appkey.腾讯微博appkey. 1.引用JS文件 <script src=& ...

最新文章

  1. 29个简单直观的移动设备网页设计
  2. asp.net网页出现名称以无效字符开头的解决方法
  3. mysql 列出表_[MySQL优化1]centos中MySQL列出所有表
  4. forward和redirect有什么区别?
  5. 【机器学习基础】数学推导+纯Python实现机器学习算法30:系列总结与感悟
  6. NEFU705(数论+DP)
  7. ETL的数据同步工具调研(持续更新中)
  8. java两种绑定方式_Javascript绑定事件的两种方式的区别
  9. mysql的exp平方_MySQL EXP()用法及代码示例
  10. Java学习笔记:进程与线程、BIO、NIO、Selector
  11. mac上python无法import redis
  12. python列表排序sort_python列表排序方法reverse、sort、sorted
  13. 学习bcgcontrol1
  14. 【黑苹果教程】修复OS X 10.11+上HD4200/HD4400/HD4600/HD5600驱动
  15. linux下查看tomcat使用的jdk版本
  16. android 获取刘海高度,不同刘海屏幕获取安全高度
  17. light动名词_英语语法大全之动名词
  18. Java-如何防范CSRF攻击
  19. Spring MVC的数据绑定(简单数据绑定+POJO类型绑定)
  20. The Fewest Coins(多重背包+完全背包)

热门文章

  1. uniapp 自定义easycom
  2. ToDesk安装与使用
  3. Python基础 | Python的组合数据类型
  4. 解决打开管家婆软件报表慢的问题
  5. hihoCoder 1095 HIHO Drinking Game 微软苏州校招笔试 12月27日
  6. 常用眼底图像数据集简介及下载--糖尿病视网膜病变 EyePacs,APTOS2019,STARE数据集
  7. python的学习笔记案例1--汇率兑换4.0
  8. 刘志军的高铁遗产 ——看看日本高铁是怎么建起来的
  9. java基础17 模板模式
  10. 如何控制企业成本?控制成本有什么作用!