ali_kitson
ali_kitson

Reputation: 95

instafeed.js: The access_token provided is invalid

Is anyone else experiencing issues with their Instagram feed using instafeed.js?

I've been getting the getting the following javascript console error since about 5 days ago, which was perviously working fine.

Uncaught Error: Error from Instagram: The access_token provided is invalid

This is my code:

if ($('#instafeed').length == 1) {
    var feed = new Instafeed({
        get: 'user',
        userId: USER_ID,
        clientId: 'CLIENT_ID',
        template: '<div class="columns small-6 medium-4 large-3"><div class="instagram-image-wraper"><a class="test" href="{{link}}"><img src="{{image}}" /></a></div></div>',
        resolution: 'low_resolution',
        limit: 12,
    });
    feed.run();
}

I'm unsure if this is related to the platform policy updates that were mentioned a few days ago - http://developers.instagram.com/

Upvotes: 8

Views: 8488

Answers (3)

Jason
Jason

Reputation: 1

Using pixelunion seems to work but you may also need to add your user(s) via the Instagram developers page, through the Sandbox options if you're using Instafeed for anyone other than your own Instagram account.

Although the access tokens are not guaranteed to be 'forever', Instagram appears to be adding the disclaimer to protect itself against liability in case some change were needed in the future rather than actually stating that the generated tokens will definitely expire.

Upvotes: 0

Thomas Bolander
Thomas Bolander

Reputation: 3952

Maybe you can use my solution. The solution is in PHP, but works :)

Instagram workarond

Upvotes: 0

kkakkurt
kkakkurt

Reputation: 2800

Instagram has changed their policy and instafeed.js requires access token now.

You can create an access token with this site.

After creating an access token, you can use instafeed.js like this:

var feed = new Instafeed({
    get: 'user',
    userId: 'UserID',
    clientId: 'ClientID',
    accessToken:'AccessTokenInHere',
    resolution: 'low_resolution',
    template: '<div class="columns small-6 medium-4 large-3"><div class="instagram-image-wraper"><a class="test" href="{{link}}"><img src="{{image}}" /></a></div></div>',
    limit: 12,
    });

Upvotes: 7

Related Questions