Instagram API的可悲状态 [英] Pathetic state of Instagram API

查看:85
本文介绍了Instagram API的可悲状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

答案不再有效的相关问题:

Related questions with answers which are no more valid:

  • How Does Instagram's GET/tags//media/recent Pagination Actually Work?
  • Understanding min_tag_id and max_tag_id
  • Instagram Search for a tag within particular date range

当我探索Instagram API且我的应用程序处于沙盒模式时,我对API的每一步感到惊讶.这不应该是公共API的条件 ( 谁在乎 !).

As I am exploring the Instagram API and my app is in sandbox mode, I am surprised by API at every step. This should not be condition of public API ( who cares !).

我要尝试的Api终点是:

The Api end point I am trying to is:

https://api.instagram.com/v1/tags/{tag -name}/media/recent?access_token =访问令牌

所需的参数是:

  • access_token [有效的访问令牌.]
  • max_tag_id [在此max_tag_id之后返回媒体.]
  • min_tag_id [返回此min_tag_id之前的媒体.]
  • count [要返回的已标记媒体的数量.]

由于我不知道如何获取或生成max_tag_idmin_tag_id,因此我跳过并尝试了以下操作: https://api.instagram.com/v1/tags/jokes/media/recent?access_token=x.y.x&count=10

Since I dont know how to get or generate max_tag_id and min_tag_id, I skipped and tried this : https://api.instagram.com/v1/tags/jokes/media/recent?access_token=x.y.x&count=10

我得到的答复是:

{分页":{"deprecation_warning":"next_max_id和min_id是 不推荐使用此端点;改用min_tag_id和max_tag_id}, 数据":[],元":{代码":200}}

{"pagination": {"deprecation_warning": "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"}, "data": [], "meta": {"code": 200}}

可能我需要max_tag_idmin_tag_id并允许尝试放置 范围是1到10(我不知道如何生成这些值)

May be I need max_tag_id and min_tag_id and lets trying putting rang values 1 to 10 ( I dont know how to generate these values )

https://api.instagram.com/v1/tags/jokes/media/recent?access_token=x.y.x&count=10&min_tag_id=1&max_tag_id=10

我得到的答复是:

{元":{代码":400,错误类型":"APIInvalidParametersError", "error_message":"max_id不能是媒体ID."}}

{"meta": {"code": 400, "error_type": "APIInvalidParametersError", "error_message": "max_id must not be a media id."}}

现在错误引起误解,正如您所见,我从未提供参数max_id.

Now the error is misleading, I never provided parameter max_id as you can see.

请帮助减少这种精神错乱

Please help to reduce this insanity

对于那些没有解决问题的人:

For those who are not getting the question:

  • max_tag_idmin_tag_id的有效值是什么
  • 当没有传递此类参数时,max_id must not be a media id.是什么意思..
  • What is the valid value for max_tag_id and min_tag_id
  • What is the meaning of max_id must not be a media id. when there is no such parameter passed etc ..

推荐答案

就像您处于沙盒模式一样,因此您将不会获取任何公共数据,而只会从您或您的沙盒用户那里获取数据. 尝试搜索已为其发布照片的主题标签,然后您将仅在API响应中看到该照片. 获得public_content权限的批准并上线后,您将看到所有数据.

Looks like you are in Sandbox mode, so you will not get any public data, you will only get data from you or your sandbox users. Try search for an hashtag that you have posted a photo for, then you will just see that photo in API response. Once you get approved with public_content permission, and go live, you will see all data.

max_tag_idmin_tag_id现在已加密,您不能只是生成,首先在没有max_idmin_id的情况下进行API调用,您将在分页中获得带有20个结果的响应API响应部分,您可以使用此max_tag_id进行下一个API调用,以获取下一组20个结果. (顺便说一句,只有在您获得Instagram批准并且不在沙盒中的情况下,您才能在API响应中进行分页,所以算了吧,祝您好运)

max_tag_id and min_tag_id are encrypted now, you cannot just generate, you first make a API call without the max_id or min_id, you will get the response with 20 results with max_tag_id in the pagination section of API response, which you can use this max_tag_id to make next API call, for next set of 20 results. (and btw you will have pagination in API response only if you are approved by Instagram and are out of Sandbox, so go figure, good luck)

这篇关于Instagram API的可悲状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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