如何使用Instagram API获取图像 [英] How to get images using Instagram API

查看:223
本文介绍了如何使用Instagram API获取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 Instagram API 获取用户图像?

access_token = 4049241557.1677ed0.5324ad17d9314645b528ad112da8d56e

access_token=4049241557.1677ed0.5324ad17d9314645b528ad112da8d56e

但是没有成功,它只给我用户信息. 如何使用Instagram API获取图像?

But no success, it's giving me only user info. How can I get images using Instagram API?

推荐答案

使用此API:

https://api.instagram.com/v1/users/self/media/recent?access_token={access-token}

这将获取您的照片,(但从您发布的access_token中看起来,该用户没有发布任何照片,因此它将返回空数组)

This will get your photos,(but it looks like from the access_token you have posted, that user does not have any photos posted, so it will return empty array)

使用它来获取其他用户的照片:

Use this to get other user's photo:

https://api.instagram.com/v1/users/{user-id}/media/recent?access_token={access-token}

您应该已经通过public_content范围进行了身份验证,并且如果您处于沙盒模式,则只有沙盒用户可以访问,直到您的应用程序审阅并生效

you should have authenticated with public_content scope and if you are in sandbox mode, only sandbox users can be accessed until your app is reviewed and live

这篇关于如何使用Instagram API获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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