Embed multiple instagram images without access_token

三世轮回 提交于 2019-12-24 08:29:27

问题


The instagram docs say:

https://api.instagram.com/v1/tags/nofilter/media/recent?access_token=ACCESS_TOKEN

The Instagram API requires an access_token from authenticated users for each endpoint. We no longer support making requests using just the client_id.

But to get an access_token, users of my website must click through and authenticate, right?

How can I display a few pictures of a specific instagram-tag on my public website, without requiring users to sign in via their instagram-account?

(There seem to be other pages doing it somehow, is there an iframe embed that displays multiple images? I've only found one where you can display one specific image...)

Update: This WordPress plugin seems to do it with having the admin (i.e. me) generate the access_token once and then having the page use it for all users. Any drawbacks to that approach?


回答1:


if that access_token expires for some reason or instagram invalidates it, then it will stop working, you should not assume access_token is valid forever.

Usually it does not expire that often, so if you monitor your widget constantly and update access_token if it has stopped working, then you should be good.



来源:https://stackoverflow.com/questions/41986241/embed-multiple-instagram-images-without-access-token

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!