Instagram API检索哈希媒体-此端点已弃用next_max_id和min_id;使用min_tag_id和max_tag_id代替 [英] Instagram API Retrieve Hash Media - next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead

查看:255
本文介绍了Instagram API检索哈希媒体-此端点已弃用next_max_id和min_id;使用min_tag_id和max_tag_id代替的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获取instagram标签媒体,如 iconosquare



所以我正在使用 Cosenary PHP Api 来启动我的



在我使用 $ instagram-> getLoginUrl()进行身份验证/访问网址后 c p>

然后,页面将使用?code 参数将我重定向到我的回调网址。



在我的回调URL的php文件中,使用代码并获取我的access_token:

  $ data = $ instagram-> getOAuthToken($ _ GET ['code']); 
$ access_token = $ data-> access_token;

因此,使用access_token试图获取咖啡媒体标签文件

  $ url = https://api.instagram.com/v1/tags/coffee/media/recent?access_token= { $ access_token}; 

并使用Php CURL 方法,



数据以

  array(3){
[ pagination] =>
array(1){
[ deprecation_warning] =>
string(94)此端点不建议使用next_max_id和min_id;请改用min_tag_id和max_tag_id
}
[ meta] =>
array(1){
[ code] =>
int(200)
}
[ data] =>
array(0){
}
}

我可以知道什么是min_tag_id和max_tag_id吗?
我添加了参数,遵循此链接,但仍能达到相同的结果。



我无法在 instagram开发者网站

解决方案

我刚刚发现了我的Instagram应用程序处于沙盒模式。
因此它不会返回任何数据(因为我的instagram没有#coffee哈希标签,而是尝试搜索您自己(或任何沙箱用户的)instagram的哈希标签...



如果应用程序的审核状态为批准,则它将检索公共主题标签,而不是沙盒用户的主题标签。



Instagram确实在< a href = https://www.instagram.com/developer/review/ rel = noreferrer>此处,当应用程序处于沙箱模式时,存在一些限制。


I want to fetch instagram hashtag media like iconosquare.

So I'm using Cosenary PHP Api to kickstart my instagram project.

After I authenticate/access the url with the $instagram->getLoginUrl()

Then the page will redirect me to my callback url with ?code parameters.

In my callback url's php files, I use the code and get my access_token :

$data  = $instagram->getOAuthToken($_GET['code']);
$access_token = $data->access_token;

So with the access_token, am trying to get coffee media tag files

$url   = "https://api.instagram.com/v1/tags/coffee/media/recent?access_token={$access_token}";

and access it using Php CURL method,

but the data return to me as

array(3) {
  ["pagination"]=>
  array(1) {
    ["deprecation_warning"]=>
    string(94) "next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"
  }
  ["meta"]=>
  array(1) {
    ["code"]=>
    int(200)
  }
  ["data"]=>
  array(0) {
  }
}

May I know what is min_tag_id and max_tag_id ? I added the parameter follow this link but still achieve the same result.

I can't search any documentation on instagram developer website.

解决方案

I just found out my Instagram Application is in sandbox mode. So it doesn't return me any data ( it because my instagram doesn't have #coffee hash tag, try to search your own ( or any sandbox user's ) instagram's hashtag instead...

If the Application's review status is approved, then it will retrieve public hashtag instead of sandbox user's hashtag.

Instagram did have stated on here that there is some limitation when an application is in sandbox mode.

这篇关于Instagram API检索哈希媒体-此端点已弃用next_max_id和min_id;使用min_tag_id和max_tag_id代替的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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