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

问题描述

据我所知,在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:

{元:{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/ {媒体ID} /喜欢和{媒体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状态code的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 21:18