【问题标题】:Upload media with unofficial Instagram API使用非官方 Instagram API 上传媒体
【发布时间】:2014-08-22 08:03:54
【问题描述】:

我正在编写一个按计划将照片上传到 Instagram 的脚本。 Instagram 官方 API 不允许媒体上传。我发现今天唯一的解决方案是使用unofficial API。所以,我正在尝试使用它,但它对我的所有请求都响应 301 错误。

Ruby 代码:

url = 'https://instagr.am/api/v1/accounts/login/'
RestClient.post url, { username: 'username', password: 'password', device_id: '0000' }, user_agent: 'Instagram'
# RestClient::MovedPermanently: 301 Moved Permanently

或者卷曲:

$ curl -k --data "username=username&password=password&device_id=0000" --header "User-Agent: Instagram" https://instagr.am/api/v1/accounts/login/
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

您能否帮我找出我的请求中的错误或提出更好的解决方案如何将媒体上传到 Instagram?

【问题讨论】:

    标签: ruby curl upload instagram


    【解决方案1】:

    Instagram 已经设置了“非官方”API 请求所需的签名。如果您能找到如何生成该签名,那么您将获得成功...我已经大致了解了它的原理通过查看他们的 android 版本的源代码来完成,但我从来没有完全破解过这个过程,也没有时间花在上面..

    有一些第三方客户可以做到这一点,但 IG 似乎很擅长检测和删除这些照片......并且经常禁止该帐户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-14
      • 2018-07-21
      • 2017-08-28
      • 2017-11-09
      • 1970-01-01
      相关资源
      最近更新 更多