惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
博客园 - 司徒正美
Martin Fowler
Martin Fowler
T
Tailwind CSS Blog
B
Blog RSS Feed
Vercel News
Vercel News
博客园 - 聂微东
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
GbyAI
GbyAI
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
C
Check Point Blog
MongoDB | Blog
MongoDB | Blog
B
Blog

月光博客

AI编程从零开始:环境配置到开发调试-月光博客 母亲被保健品诈骗-月光博客 向身体低头,向岁月妥协:我的高血压“还债日记” -月光博客 月光博客电子书:《信息安全指南》 谷歌发布2025年度搜索排行榜 中国2025社会热点大事记 2025年十大流行语发布 7天3次,骗子骗走我母亲95万元 “技术男”设三重安全墙,母亲95万存款还是被骗走了 电信诈骗后的复盘:母亲的95万元,是怎么从手机银行里消失的 母亲被电信诈骗95万元的全过程 阿根廷警察被谷歌街景相机拍到裸照 网信办开展“清朗·整治恶意挑动负面情绪问题”专项行动 翟欣欣敲诈勒索案一审获刑12年 《绝命毒师》影评:力工觉醒后的梭哈至死 《人工智能生成合成内容标识办法》正式施行 用AI分析你的财务信息 腾讯子公司实习HR怒怼求职者后被开除 OpenAI发布最强模型GPT-5,免费向所有用户开放 用AI解构你的日记 用AI分析你的游戏偏好 用AI分析你的观影偏好 用AI分析你的听歌偏好 《白鹿原》人物分析:乱世浮沉中的人性剖析 乌托邦的捷径:让AI治理“失败国家” 苹果AI的“路径错误”:为什么它在大模型时代掉队了? 《暗黑破坏神3》第35赛季开荒指南 我对特朗普的看法 欧·亨利十大经典小说鉴赏 HBO电视剧《最后生还者》第二季影评
Twitter和饭否的好友管理工具
月光 · 2009-06-12 · via 月光博客

微博客做为社会化网络的重要组成部分,具有比传统即时通讯(IM)软件更多的优势,例如可以看到好友的好友,可以关注陌生人的信息,但这也带来另一个问题:信息过载。

如果用户关注(Follow)的用户数非常多,那么将在短时间内接收到大量来自好友的“信息轰炸”,这显然会给降低未必可的可用性。微博客和IM不同的是,你Follow的很多人可能你并不认识,为了能更加有效的使用微博客,获得更多有用的信息,对自己的好友进行合理管理势在必然。

我个人觉得,对于好友的管理可以遵循以下几点:

1、关注自己认识的朋友或者同事、亲人等。

2、关注一些知名用户,通常知名用户的关注者都非常多,名气越大,Followers越多。

3、合理取舍,特别是那些更新频率非常高的“话痨”,如果其更新的内容没有太大价值,就删除掉。

经过这样的好友管理,微博客的使用就会变得更为有效。

然而可惜的是,目前流行的微博客,如Twitter和饭否等,都没有这样的好友管理工具,在好友界面中,只能看到好友的id和名称,无法看到其关注着数量和更新数量,因此,我通过研究Twitter和饭否的API,写了一个Twitter和饭否的好友管理工具,可以方便的实现上面的功能。

此工具为开源工具,全部源代码只有20多行,对于Twitter用户来说,先输入用户名和页数,提交后即可看到显示的前100个好友,信息包含好友的id、姓名、关注者(Followers)数量、更新数量,如果要想删除一个好友,点后面的“del”按钮即可删除,点击后会转到Twitter的API服务器,需要输入用户的Twitter用户名和密码才能真正删除。

由于Twitter对于API有每小时100次查询的限制,超过了这个次数就会封IP,因此这个工具我就不在线提供演示了,大家将下面的ASP代码复制到一个支持ASP的主机空间上运行即可。

Response.Write "<form action=" + Request.ServerVariables("URL") + " method='post'>Twitter Username:<input type='text' id='username' name='username' value='" + Request.Form("username") + "'>  Page:<input type='text' id='page' name='page' value='" + Request.Form("page") + "' size='2'> (Page>=1) <input type='submit'> </form>"
if Request.Form("username")<>"" Then
  Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
  xmlHttp.open "GET", "http://Twitter.com/statuses/friends.xml?page=" + Request.Form("page") + "&screen_name=" + Request.Form("username"), false
  xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"
  xmlHttp.send (null)
  If (xmlHttp.Status = 200) Then set root = xmlHttp.responseXML.documentElement Else Response.End
  for i=1 to root.childNodes.length
    set node = root.childNodes.item(i)
    if not node is Nothing then
      set node2 = node.childNodes.item(1)
      name = node2.nodeTypedValue
      set node2 = node.childNodes.item(2)
      id = node2.nodeTypedValue
      set node2 = node.childNodes.item(8)
      followers = node2.nodeTypedValue
      set node2 = node.childNodes.item(21)
      statuses = node2.nodeTypedValue
      Response.Write "<form action='http://twitter.com/friendships/destroy.xml?screen_name=" + id + "' method='post' target='_blank'>"
      Response.Write "id:" + id + " , name:" + name + " , followers:" + followers + " , updates:" + statuses
      Response.Write " - <input type='submit' value='del'></form> <br/>"
    end if
  next
  Set xmlHttp=Nothing
End if

对于饭否来说,也是同样的道理,其代码和Twitter的非常类似,不过,由于饭否功能的限制,其API并不提供“更新数量”这个字段,因此列表中只显示用户的id、姓名和关注者数量,建议饭否能把“更新数量”这个字段加上去。饭否的好友管理代码如下所示,其安装和运行与Twitter的一样,在线演示点这里

Response.Write "<form action=" + Request.ServerVariables("URL") + " method='post'>Fanfou Username:<input type='text' id='username' name='username' value='" + Request.Form("username") + "'>  Page:<input type='text' id='page' name='page' value='" + Request.Form("page") + "' size='2'> (Page>=1) <input type='submit'> </form>"
if Request.Form("username")<>"" Then
  Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
  xmlHttp.open "GET", "http://api.fanfou.com/users/friends.xml?page=" + Request.Form("page") + "&id=" + Request.Form("username"), false
  xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"
  xmlHttp.send (null)
  If (xmlHttp.Status = 200) Then set root = xmlHttp.responseXML.documentElement Else Response.End
  for i=1 to root.childNodes.length
    set node = root.childNodes.item(i)
    if not node is Nothing then
      set node2= node.childNodes.item(0)
      id = node2.nodeTypedValue
      set node2= node.childNodes.item(1)
      name = node2.nodeTypedValue
      set node2= node.childNodes.item(9)
      followers = node2.nodeTypedValue
      Response.Write "<form action='http://api.fanfou.com/friendships/destroy/fanfou.xml?id=" + id + "' method='post' target='_blank'>"
      Response.Write "id:" + id + " , name:" + name + " , followers:" + followers
      Response.Write " - <input type='submit' value='del'></form> <br/>"
    end if
  next
  Set xmlHttp=Nothing
End if

如果大家对这个工具还有什么意见和疑问,可以加我的Twitter饭否来咨询。

更新:另外增加了一个嘀咕的好友管理,在线演示点这里,代码如下所示。

Response.Write "<form action=" + Request.ServerVariables("URL") + " method='post'>Digu Username:<input type='text' id='username' name='username' value='" + Request.Form("username") + "'>  Page:<input type='text' id='page' name='page' value='" + Request.Form("page") + "' size='2'> (Page>=1) <input type='submit'> </form>"
if Request.Form("username")<>"" Then
  Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
  xmlHttp.open "GET", "http://api.digu.com/statuses/friends.xml?page=" + Request.Form("page") + "&friendUserId=" + Request.Form("username"), false
  xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"
  xmlHttp.send (null)
  If (xmlHttp.Status = 200) Then set root = xmlHttp.responseXML.documentElement Else Response.End
  for i=1 to root.childNodes.length
    set node = root.childNodes.item(i)
    if not node is Nothing then
      set node2 = node.childNodes.item(1)
      id = node2.nodeTypedValue
      set node2 = node.childNodes.item(2)
      name = node2.nodeTypedValue
      set node2 = node.childNodes.item(8)
      followers = node2.nodeTypedValue
      set node2 = node.childNodes.item(19)
      statuses = node2.nodeTypedValue
      Response.Write "id:" + id + " , name:" + name + " , followers:" + followers + " , updates:" + statuses
      Response.Write " - <a href='http://api.digu.com/friendships/destroy.xml?userIdOrName=" + id + "' target='_blank'>del</a> </form> <br/>"
    end if
  next
  Set xmlHttp=Nothing
End if

Twitter和饭否的好友管理工具