【问题标题】:Twitter API 1.1 friendships/create rate limitTwitter API 1.1 友谊/创建速率限制
【发布时间】:2013-01-27 15:45:24
【问题描述】:

我正在将我的应用程序从 Twitter API 版本 1 迁移到 1.1,并且遇到了友谊/创建问题。

根据 1.1 文档 (https://dev.twitter.com/docs/api/1.1/post/friendships/create),friendships/create 没有速率限制,但是当我调用friendships/create 时,我可以看到速率限制为 15(根据“x-rate-limit-limit”) .

我在这里做错了吗?每个时间窗口的速率限制真的是 15 次吗?

【问题讨论】:

    标签: twitter


    【解决方案1】:

    Ran 找到了解决方案:

    我使用 twitter gem,当你调用 follow 它时,它首先会调用friends/ids,以确保你尚未关注该成员,并且 /friends/ids 每个窗口限制为 15 个调用。

    解决方案是调用 follow!(使用 ! )来避免检查。

    从这里:https://dev.twitter.com/discussions/14894

    【讨论】:

    • 嘿,链接不再有效。你能显示你用来拨打电话的代码吗?我无法关注使用 API 的人。
    【解决方案2】:

    根据creating friendships 上的新 Twitter API 文档:

    如果用户已经是用户的朋友,则 HTTP 403 可能是 返回,但出于性能原因,此方法也可能返回 即使跟随关系已经存在,HTTP 200 OK 消息。

    【讨论】:

      猜你喜欢
      • 2016-03-31
      • 1970-01-01
      • 2014-08-05
      • 1970-01-01
      • 2013-06-23
      • 1970-01-01
      • 2022-08-22
      • 1970-01-01
      • 2022-11-10
      相关资源
      最近更新 更多