Is there still a way to fetch instagram feed witho

2019-03-10 02:43发布

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.

3条回答
够拽才男人
2楼-- · 2019-03-10 03:20

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.

查看更多
聊天终结者
3楼-- · 2019-03-10 03:21

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

查看更多
霸刀☆藐视天下
4楼-- · 2019-03-10 03:21

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

查看更多
登录 后发表回答