I’m not being able to show my instagram feed

Asked

Viewed 184 times

1

Good afternoon friends, do not understand why my page not show my instagram feed, someone can help me?

This is the error shown: Instagram: The access_token provided is invalid.

Code in JS

$(function() {

    //Set up instafeed
    var feed = new Instafeed({
        clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
        target: 'instafeed',
        get: 'tagged',
        tagName: 'photographyportfolio',
        links: true,
        limit: 8,
        sortBy: 'most-recent',
        resolution: 'standard_resolution',
        template: '<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"><div class="photo-box"><div class="image-wrap"><a href="{{link}}"><img src="{{image}}"></a><div class="likes">{{likes}} Likes</div></div><div class="description">{{caption}}<div class="date">{{model.date}}</div></div></div></div>'
    });
    feed.run();

});

HTML code

<div class="instagram-content">
    <h3>Latest Photos</h3>
    <div class="row photos-wrap">
    <!-- Instafeed target div -->
    <div id="instafeed"></div>
    <!-- The following HTML will be our template inside instafeed -->
    <!-- <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
        <div class="photo-box">
            <div class="image-wrap">
                <img src="images/test_img.jpg">
                <div class="likes">309 Likes</div>
            </div>
            <div class="description">
                Fantastic Architecture #architecture #testing
                <div class="date">September 16, 2014</div>
            </div>
        </div>
    </div> -->

    </div>
</div>
  • Some error in the console?

  • none, I took this example: http://webdesign.tutsplus.com/pt/tutorials/building-an-instagram-based-portfolio-with-bootstrap-cms-22243 - I put my id and I couldn’t see it.

  • How’s the head of your html ?

  • You saw in the "network" tab of the dev-tools the ajax request to leave? what gives there?

1 answer

0

I managed to solve only a part, because I do not want to show by #hashtag but by user:

$(function() {

//Set up instafeed
  var userFeed = new Instafeed({
  get: 'tagged',
  target: 'instafeed',
  clientId: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  accessToken: 'XxxXXxxXXXXXXXXXXXXXXXXXXXXXXXxxxxxxxxxxx',
  tagName: 'maceio',
  links: true,
  limit: 8,
  sortBy: 'most-recent',
  resolution: 'standard_resolution',
  template: '<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"><div class="photo-box"><div class="image-wrap"><a href="{{link}}"><img src="{{image}}"></a><div class="likes">{{likes}} Likes</div></div><div class="description">{{caption}}<div class="date">{{model.date}}</div></div></div></div>'
});
userFeed.run();
});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.