有人尝试过使用 Twitter 来取代网络应用程序上的评论部分吗?

发布于 2024-09-07 18:46:54 字数 227 浏览 4 评论 0原文

这是我想象的场景。

简单的博客,用户通常在每篇博客文章底部的评论表单中发表评论。相反,使用 Twitter API 根据主题标签提取推文。主题标签基于文章 ID(即 #site10201),其中 site 是前缀,数字是文章 ID。

然后提供一个使用主题标签发布推文的链接,然后该链接将在您的 Twitter api 拉取中被选取。

我正在想象可怕的垃圾邮件问题,但除此之外,这是个坏主意吗?

Here's the scenario I'm imagining.

Simple blog, users typically post comments in a comments form at the bottom of each blog article. Instead of that, using the Twitter API, pull tweets based on a hashtag. Base the hashtag on the article id (i.e. #site10201) where site is a prefix and the number is the article id.

Then provide a link to post a tweet using the hashtag., which would then get picked up in your twitter api pull.

I'm imagining horrible spam issues, but other than that, bad idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

2024-09-14 18:46:54

对于更普通的数据库系统来说有一些缺点:

  1. 额外的网络开销。大多数自托管博客通常依赖于同一服务器(物理或虚拟)上的数据库和博客,因此与 Twitter API 请求相比,数据库查找速度更快(且可靠)。
  2. 缓存问题。一台主机一次只允许 X 个 twitter 请求(下一个请求将以 404 结束),对于随着多篇文章的添加而变得越来越复杂的场景,您将如何从您的网站管理该请求?大概您需要进行身份验证,因此最简单的解决方法是承担安全责任。 (最简单的方法是在浏览器上使用 JavaScript 来执行实际请求,以 20/80 的方式巧妙地规避了这个问题。) 当然,大多数博客都不会获得这种流量。 ;)
  3. 你将你的宝贵或不那么宝贵的评论与失败鲸的怜悯联系起来。考虑到自托管博客基本上意味着您希望通过不使用博客之类的服务来拥有这样的控制权,这有点奇怪。
  4. 在一般情况下是否可以确保哈希标签的唯一性?如果有人有同样的好主意,但只比你早 5 毫秒获取标签名称,你会怎么做?您是否会最终模仿别人博客评论的胡言乱语,而不是您所期望的精彩评论? ;)
  5. 较小的一点:您依赖其他人拥有 Twitter 帐户。匿名回复是不可能的。
  6. Twitter 现在或将来可能向您强加的服务条款和其他注意事项。 (2)实际上是Twitter TOS的一个主要项目。

Has some drawbacks to more run-of-the-mill database systems:

  1. Additional network overhead. Most self-hosted blogs would typically rely on database and blog being on the same server (physical or virtual) so db-lookup is fast (and reliable) compared to twitter API requests.
  2. Caching issues. One host is only allowed X requests of twitter at a time (the next request is going to end up a 404), and how are you going to manage that from your website for a scenario which becomes steadily more complex as multiple articles are added? Presumably you need to authenticate so the easy-way out is a security liability. (The easy way out being to use JavaScript on the at the browser to perform the actual request, neatly circumvents the problem in 20/80 fashion.) Granted most blogs don't get that kind of traffic. ;)
  3. You tie your precious or not so precious comments to the mercy of the fail whale. Which is kind of odd considering a self-hosted blog basically means you want to have such control in the first place by not using a service like blogger.
  4. Is it possible to ensure unicity of hash tags --in the general case? What are you going to do if someone had the same bright idea, only took the name of the tag 5ms before you did? Would you end up pulling the drivel of someone else's blog comments rather than the brilliance you have come to expect from yours? ;)
  5. Lesser point: you rely on others to have a twitter account. Anonymous replies are off the table.
  6. TOS and other considerations that may be imposed on you by twitter, either now or in future. (2) is actually a major item of Twitter's TOS.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文