欢迎各位兄弟 发布技术文章
这里的技术是共享的
很多做网站、博客的站长朋友们,希望在网页上添加自己的新浪微博的“加关注”(快速收听)代码,便于网友和访问者能够快速关注自己或网站的微博。
优点如下:
1. 让他人可以快速收听你的微博帐号
将快速收听模块嵌入网页,访客点击收听按钮,就能一键收听的你新浪微博帐号。
2. 显示你的微博帐号信息
新浪微博提供四种样式,可选择显示简洁样式的“加关注”按钮、你的微博昵称、粉丝数等,更好的吸引他人收听你的微博帐号。
效果如下:
在HTML标签中增加XML命名空间<htmlxmlns:wb=“http://open.weibo.com/wb”> 直接在原来的html标签后面添加即可。
例如我的是这样:
<htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:wb="http://open.weibo.com/wb">
在HEAD头中引入WB.JS
<scriptsrc="http://tjs.sjs.sinajs.cn/open/api/js/wb.js"type="text/javascript"charset="utf-8"></script>
在需要部署微博关注按钮的位置粘贴WBML代码
<wb:follow-buttonuid="2991975565"type="red_1"width="67"height="24"></wb:follow-button>
更多信息,请访问
http://open.weibo.com/widget/followbutton.php
来自 http://jingyan.baidu.com/article/ea24bc395375e5da62b33106.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>点击按钮自动加关注代码——新浪微博</title>
</head>
<body>
<iframe allowtransparency="" border="0" frameborder="0" height="22" marginheight="0" marginwidth="0" scrolling="no" src="http://widget.weibo.com/relationship/followbutton.php?width=200&height=22&uid=1282557022&..." style="width: 64px; height: 22px;" width="200"></iframe>
</body>
</html>
来自 http://www.codefans.net/jscss/code/2951.shtml
来自 http://bbs.blueidea.com/thread-3043039-1-1.html
<iframe src="http://widget.weibo.com/relationship/followbutton.php?language=zh_cn&width=136&height=24&uid=2040039955&style=2&btn=red&dpc=1" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="117" height="24"></iframe>
将蓝色uid=后面的数字换成你的就行了
来自 http://blog.sina.com.cn/s/blog_79988a13010157r0.html
来自 http://open.weibo.com/widget/followbutton.php