Instagram访问令牌 [英] Instagram access token

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

问题描述

我需要在我的网页上显示一位用户的影像图.因此,观看页面的用户不需要任何登录"掩码,只需查看用户(当前网页的所有者)的照片即可.

I need to display intsagram photo by one user in my webpage. So, users that watch the page don't need any "login" mask, just look at the photos by the user (which is the owner of the current webpage).

因此,在我进一步的应用程序中,我可以致电:

So, in my further application I can call:

https://api.instagram.com/v1/users/" + userID + "/media/recent?client_id=" + id + "&access_token=2822asfa656.24523525.934634634csafa8asasaeea40

但是Instagram API说访问令牌可能在将来的任何时候失效..

But Instagram API says Access tokens may expire at any time in the future..

那么我该如何管理这种情况?以后,我不会每次都更改access_token!

So how can I manage this scenario? I won't to change access_token every time, in the future!

推荐答案

有相同的问题.最佳和最可靠的imo解决方案:

Had same issue. The best and most reliable solution imo:

  1. 从' http://instagram.com/ {user_name} /中获取json媒体"
  2. ... your_code(模板等)...
  3. 缓存结果
  4. 利润:D
  1. fetch json from 'http://instagram.com/{user_name}/media'
  2. ... your_code (templating etc) ...
  3. cache the result
  4. profit :D

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

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