How to get a user's Instagram feed

后端 未结 7 888
北海茫月
北海茫月 2020-12-04 23:10

I\'d like to get a user\'s Instagram feed using PHP. I\'ve signed up for an Instagram Developer Account and tried pulling in a user\'s info and photos, but the response isn

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 23:48

    this function goes in your App class, but can be a regular function and it will work anyways.

    the result can be navigated interactively using this tool: http://jsonviewer.stack.hu/

    in my case i'm using blade template engine (https://laravel.com/docs/5.8/blade)

    so the template will be

    @foreach($instagram->data as $gram)
       
    @endforeach
    

    that's it!

提交回复
热议问题