javascriptjqueryinstagraminstafeedjs

Instafeed.js not uploading photos


Does instafeed.js only work with an active website? I'm trying to add my friends instagram photos to the website I'm creating for him but the website is not yet 'live/active' so I feel this must be the reason why it's not working.

Does the instafeed.js work in test mode?

$(document).ready(function(){

var Feed = new Instafeed({
    get: 'user',
    userId: '4950173594',
    clientId: '0a8d7d566c7a4049bdba43a03d1cfd66',
    accessToken: '4950173594.0a8d7d5.b61e3c7e54024b2ca1d3b74399b63d9f',
    resolution: 'standard_resolution',
    sortBy: 'most-recent',
    limit: 4,
    links: false,
    template: '<a href="{{link}}"><img src="{{image}}" /></a>',
});


  userFeed.run();

});

Solution

  • You need to (or get your client to) log into the Instagram account which you want to grab feeds from.

    Visit http://instagram.pixelunion.net/

    Authorize the apps to generate the access token.

    <script type="text/javascript">
        var feed = new Instafeed({
        get: 'user',
        userId: 'XXXXX',
        accessToken: 'XXXXX.123456789........xyz',
      });
      feed.run();
    </script>
    
    <div id="instafeed"></div>
    

    USER_ID is simply the first few numbers before the dot in your Access Token

    XXXXXXXXXX.12345678....

    no client_id needed