Instagram“你不能喜欢这个媒体"400状态码 [英] Instagram “You Cannot Like this Media” 400 status code

查看:27
本文介绍了Instagram“你不能喜欢这个媒体"400状态码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道几个小时前 Instagram API 已关闭,但现在似乎已恢复.问题是,当我们将数据发布到 Instagram 说喜欢某张特定照片时,我们会收到此错误:

I am aware that the Instagram API was down a few hours ago, but it seems to be back up now. The problem is, when we post data to Instagram saying to like a specific photo, we get this error:

{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"你不能喜欢这个媒体"}}我们以前遇到过这个错误,但我们不明白为什么会得到它.请记住,我们登录了一个备用帐户,这意味着该帐户还没有点赞媒体.

{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"you cannot like this media"}} We have gotten this error before, but we don't understand why we are getting it. Keep in mind, we logged into an alternate account which means that account hasn't even liked the media yet.

如果知道有帮助的话,我们正在通过请求 url https://api.instagram.com/v1/media/{media-id}/likes 将 {media-id} 替换为图像 ID,我们将用户的访问令牌包含在 http 请求的正文中.这显然是一个post请求

If it helps at all to know, we are running the like command by requesting the url https://api.instagram.com/v1/media/{media-id}/likes with {media-id} being replaced by the image id, and we are including the user's access token in the body of the http request. This is obviously a post request

没有 Instagram 文档说明我们为什么会收到此消息.有人有解决办法吗?

There is no Instagram documentation on why we would get this message. Does anyone have a solution?

推荐答案

我遇到了同样的事情,我发现在三种情况下我收到了这个错误:

I've run into the same thing and I found that there were three cases where I received this error:

  1. 照片已被删除.如果您正在缓存媒体数据并稍后尝试喜欢它,这可能会出现.
  2. 该用户是私密的.如果该用户是私密的并且他们未授予您关注他们的权限,则您无法为照片点赞.
  3. 您对公共 API 太喜欢了.如果您尝试喜欢一张照片并发现它既没有被删除也没有用户私密,那么 Instagram 已经暂时禁止您通过 api 喜欢的帐户.除了过度喜欢之外,我不确定是什么触发了这种情况.您最多需要等待一周,而不能通过该访问令牌进行任何大量点赞,以便超时到期(尽管您可以每隔一段时间进行一次测试,以查看此超时是否已到期).
  1. The photo has been deleted. If you are caching media data and trying to like it later this could come up.
  2. The user is private. You can't like a photo if the user is private and they haven't given you permission to follow them.
  3. You've done too much liking with the public API. If you try to like a photo and find that it's neither deleted nor is the user private, then Instagram has put a temporary ban on your account from liking via the api. I'm not sure what triggers this other than excessive liking. You'll need to wait up to a week without making any high-volume likes via that access token for the timeout to expire (although you can to a test every once in a while to see if this timeout has expired).

这篇关于Instagram“你不能喜欢这个媒体"400状态码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆