Is there still a way to fetch instagram feed without using access token now (06/2016)?

独自空忆成欢 提交于 2019-12-03 05:11:41

问题


I have an issue that my Instagram API access token keeps expiring frequently and I red the document and understood that although the token wouldn't expire generally, Instagram may decide to expire a token any time for any security reason or whatever reasons.

I know that when it expires, I need to set up an authentication process and request for a new token and all those of things. But the problem is that my app is just retrieving my own feeds to show on my own website, once the token expires it doesn't make sense to set up such a process, the only thing I can do is to manually retrieve and update the token in my code.

So I was wondering if there is still a way to get feeds without using access token as I am just pulling in my own feeds. Or is there any other way I can solve this issue?

Thanks for your help.


回答1:


If your profile is set to public mode you can fetch your data from json response just write: https://www.instagram.com/YOURUSERNAME/media

example: https://www.instagram.com/bestcookingvideos/media

you can see json structure with : http://json.parser.online.fr/

Note: This page is not active anymore : https://www.instagram.com/YOURUSERNAME/media




回答2:


https://www.instagram.com/anyuser/media stopped working today. You can use https://www.instagram.com/anyuser/?__a=1 instead.




回答3:


You can use this jquery library I developed:

https://github.com/BanNsS1/jquery.instagramFeed

No api token required

Edit for the coments below:

It's just jquery powered library that allows you to load the first 12 items of any public instagram profile.

How it solves the problem? Loading 1 to 12 last posts without requiring an access token/api key

<script type="text/javascript" src="jquery.instagramFeed.min.js"></script>
<script type="text/javascript">
    (function($){
        $(window).on('load', function(){
            $.instagramFeed({
                'username': 'instagram',
                'container': "#instagram-feed1",
                'display_profile': true,
                'display_biography': true,
                'display_gallery': true,
                'get_raw_json': false,
                'callback': null,
                'styling': true,
                'items': 8,
                'items_per_row': 4,
                'margin': 1 
            });
        });
    })(jQuery);
</script>

Want more? It will take 2 clicks and some scroll.



来源:https://stackoverflow.com/questions/37875945/is-there-still-a-way-to-fetch-instagram-feed-without-using-access-token-now-06

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