【问题标题】:Use Twitter API from one account to tweet from another account?使用一个帐户的 Twitter API 从另一个帐户发送推文?
【发布时间】:2020-04-16 06:52:26
【问题描述】:

是否可以使用我在账户 X 上的 twitter API 注册账户从另一个账户 Y(也是我的账户 Y)发推文?

【问题讨论】:

  • 不。你需要 Y 的访问令牌。
  • @ceejayoz 所以我也应该为 Y 注册一个开发帐户?

标签: twitter tweepy tweets twitterapi-python


【解决方案1】:

是的,您只需使用 OAuth 1.0a 作为帐户 Y 进行身份验证。
请参阅https://developer.twitter.com/en/docs/basics/authentication/overviewhttps://developer.twitter.com/en/docs/basics/authentication/oauth-1-0a 了解更多信息。

如果您使用的是 Tweepy,请参阅 https://tweepy.readthedocs.io/en/latest/auth_tutorial.html

【讨论】:

  • 我无法按照本手册执行此操作。我有来自账户 X 的 consumer_key 和 secret、access_token 和 secret。然后我应该如何从 tweepy 登录到另一个账户?
  • Getting started section of Tweepy's documentation 中的示例应该可以工作。
猜你喜欢
  • 1970-01-01
  • 2020-02-17
  • 2016-05-28
  • 1970-01-01
  • 2016-07-16
  • 2021-10-05
  • 1970-01-01
  • 1970-01-01
  • 2022-11-15
相关资源
最近更新 更多