`

在自己的网站添加关注新浪关注按钮

阅读更多

 

有2种方法

 

第一种是参照新浪开发平台的API  地址如下:

 

http://open.weibo.com/widget/followbutton.php

 

第二种是在html页面引入一段js

 

<iframe allowtransparency="" border="0" frameborder="0" height="22" marginheight="0" marginwidth="0" scrolling="no" src="http://widget.weibo.com/relationship/followbutton.php?width=200&amp;height=22&amp;uid=2991975565&amp;style=1&amp;btn=gray&amp;dpc=1" style="width: 64px; height: 22px;" width="200"></iframe>

 

uid 是你要关注要关注人的ID,btn 可以设置成red,或者 gray 2种样式

 

 

类似的也可以添加腾讯空间的关注按钮

<iframe scrolling="no" frameborder="0" style="width: 120px; height: 30px; border: none; overflow: hidden; margin-top: 5px;" border="0" allowtransparency="true" src="http://open.qzone.qq.com/like?url=http%3A%2F%2Fuser.qzone.qq.com%2F2504586193&amp;type=button_num&amp;width=400&amp;height=30&amp;style=3" id="iFThree"></iframe>

 

 

上面的代码是通过 腾讯开放平台提供的接口自动生成的代码:

 

 地址为:http://connect.qq.com/intro/follow/

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics