New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to Instagram API policy has broken Instafeed #408

Closed
TamaEaston opened this Issue Jun 1, 2016 · 119 comments

Comments

@TamaEaston

TamaEaston commented Jun 1, 2016

Instafeed is now returning the following error:

Uncaught Error: Error from Instagram: The access_token provided does not match an approved application.

Instagram have changed their API policy, effective as of the 1st of June: https://www.instagram.com/developer/endpoints/users/

Instagram Platform and documentation update. Apps created on or after Nov 17, 2015 will start in Sandbox Mode and function on newly updated API rate-limits and behaviors. Prior to going Live, and being able to be used by people other than the developers of the app, these apps will have to go through a new review process. Please read the API documentation or the Change Log for more details.

Any app created before Nov 17, 2015 will continue to function until June 1, 2016. On that date, the app will automatically be moved to Sandbox Mode if it wasn't approved through the review process. The previous version of our documentation is still available here.

Is development for Instafeed going to continue to address these changes?

@rhcarlosweb

This comment has been minimized.

Show comment
Hide comment
@rhcarlosweb

rhcarlosweb Jun 1, 2016

I hope so
I need this change, i have a lot clients using instafeed.js, and all is broken now 😞

rhcarlosweb commented Jun 1, 2016

I hope so
I need this change, i have a lot clients using instafeed.js, and all is broken now 😞

@mikeden

This comment has been minimized.

Show comment
Hide comment
@mikeden

mikeden Jun 1, 2016

Same boat here - just launched a website yesterday for a client that uses instafeed and now it's broken. Help!

mikeden commented Jun 1, 2016

Same boat here - just launched a website yesterday for a client that uses instafeed and now it's broken. Help!

@benrellick

This comment has been minimized.

Show comment
Hide comment
@benrellick

benrellick Jun 1, 2016

I think there's a way around this. It's not ideal, but it works. You'll have to have your client go to http://instagram.pixelunion.net/ (while they're logged in to Instagram) and generate an access token. Add the user id and access token to your instafeed code and that will allow you to pull images from the account that created the access token.

From the documentation:

var userFeed = new Instafeed({
  get: 'user',
  userId: 'YOUR_USER_ID',
  accessToken: 'YOUR_ACCESS_TOKEN'
});
userFeed.run();

benrellick commented Jun 1, 2016

I think there's a way around this. It's not ideal, but it works. You'll have to have your client go to http://instagram.pixelunion.net/ (while they're logged in to Instagram) and generate an access token. Add the user id and access token to your instafeed code and that will allow you to pull images from the account that created the access token.

From the documentation:

var userFeed = new Instafeed({
  get: 'user',
  userId: 'YOUR_USER_ID',
  accessToken: 'YOUR_ACCESS_TOKEN'
});
userFeed.run();
@rhcarlosweb

This comment has been minimized.

Show comment
Hide comment
@rhcarlosweb

rhcarlosweb Jun 1, 2016

here don't work 😞 show error message Uncaught SyntaxError: Unexpected token ;

rhcarlosweb commented Jun 1, 2016

here don't work 😞 show error message Uncaught SyntaxError: Unexpected token ;

@thomaskimura

This comment has been minimized.

Show comment
Hide comment
@thomaskimura

thomaskimura Jun 1, 2016

@benrellick Worked for me. Thankfully this is exactly what I was using instafeed for in the first place.

thomaskimura commented Jun 1, 2016

@benrellick Worked for me. Thankfully this is exactly what I was using instafeed for in the first place.

@mikeden

This comment has been minimized.

Show comment
Hide comment
@mikeden

mikeden Jun 1, 2016

I now get a different error: 'This client has not been approved to access this resource.'

mikeden commented Jun 1, 2016

I now get a different error: 'This client has not been approved to access this resource.'

@rachelrianne

This comment has been minimized.

Show comment
Hide comment
@rachelrianne

rachelrianne Jun 1, 2016

@benrellick — that's great! Works for user feeds, but doesn't work if you're trying to use 'tag' for the 'get' option.

For tagged images, you have to go through some process to move from Sandbox mode in order to access public_content, and if it's just a website, Insta doesn't even let you go through the process from what I've found so far.

rachelrianne commented Jun 1, 2016

@benrellick — that's great! Works for user feeds, but doesn't work if you're trying to use 'tag' for the 'get' option.

For tagged images, you have to go through some process to move from Sandbox mode in order to access public_content, and if it's just a website, Insta doesn't even let you go through the process from what I've found so far.

@bluesix

This comment has been minimized.

Show comment
Hide comment
@bluesix

bluesix Jun 2, 2016

Bottom line is you will need to generate a new Access Token. Do that at the pixelunion link or http://instagramwordpress.rafsegat.com/docs/get-access-token/.

bluesix commented Jun 2, 2016

Bottom line is you will need to generate a new Access Token. Do that at the pixelunion link or http://instagramwordpress.rafsegat.com/docs/get-access-token/.

@jibroin

This comment has been minimized.

Show comment
Hide comment
@jibroin

jibroin Jun 2, 2016

@bluesix Thats good. However, is it can be applied to the case is not a word press?

jibroin commented Jun 2, 2016

@bluesix Thats good. However, is it can be applied to the case is not a word press?

@bluesix

This comment has been minimized.

Show comment
Hide comment
@bluesix

bluesix Jun 2, 2016

@jibroin are you asking if it works for non-Wordpress sites? Yes. I've just fixed 4 clients sites - 2 Wordpress, 2 hand-coded. All good.

bluesix commented Jun 2, 2016

@jibroin are you asking if it works for non-Wordpress sites? Yes. I've just fixed 4 clients sites - 2 Wordpress, 2 hand-coded. All good.

@virajsoni06

This comment has been minimized.

Show comment
Hide comment
@virajsoni06

virajsoni06 Jun 2, 2016

Hi @bluesix I wanted to know how were you able get your app out of sandbox mode.

When I start a submission and select "I want to display my Instagram posts on my website." it just shows me a notification box. I couldn't find a way to get it out of Sandbox mode

Thanks

virajsoni06 commented Jun 2, 2016

Hi @bluesix I wanted to know how were you able get your app out of sandbox mode.

When I start a submission and select "I want to display my Instagram posts on my website." it just shows me a notification box. I couldn't find a way to get it out of Sandbox mode

Thanks

@thefunkybassist

This comment has been minimized.

Show comment
Hide comment
@thefunkybassist

thefunkybassist Jun 2, 2016

As far as I understand it, it shouldn't be neccesary to get out of Sandbox for public_content level feeds? At least, I can get it to authorize for that scope by adding it to the access token generator like this:
https://www.instagram.com/oauth/authorize/?client_id=...&redirect_uri=...&response_type=token&scope=public_content
To prevent double posts, see my other topic response here.

No authentication errors after that. But I can't seem get any "tagged" content, just empty response from Instagram.

thefunkybassist commented Jun 2, 2016

As far as I understand it, it shouldn't be neccesary to get out of Sandbox for public_content level feeds? At least, I can get it to authorize for that scope by adding it to the access token generator like this:
https://www.instagram.com/oauth/authorize/?client_id=...&redirect_uri=...&response_type=token&scope=public_content
To prevent double posts, see my other topic response here.

No authentication errors after that. But I can't seem get any "tagged" content, just empty response from Instagram.

@bluesix

This comment has been minimized.

Show comment
Hide comment
@bluesix

bluesix Jun 2, 2016

@virajsoni06 What @thefunkybassist said. My understanding is as long as you're just doing a get: user (i.e. just displaying a user's feed) then you don't need to do the app review thing, just need to generate a new access token.

bluesix commented Jun 2, 2016

@virajsoni06 What @thefunkybassist said. My understanding is as long as you're just doing a get: user (i.e. just displaying a user's feed) then you don't need to do the app review thing, just need to generate a new access token.

@thefunkybassist

This comment has been minimized.

Show comment
Hide comment
@thefunkybassist

thefunkybassist Jun 2, 2016

To get a working access token for "I want to display hashtag content and public content on my website." seems to be slighty schizofrenic?

Either it has to work with the URL generated access token (which now gives empty feeds) or submission to go live needs to support it. It says Instagram doesn't support this use case.

Confusing...

thefunkybassist commented Jun 2, 2016

To get a working access token for "I want to display hashtag content and public content on my website." seems to be slighty schizofrenic?

Either it has to work with the URL generated access token (which now gives empty feeds) or submission to go live needs to support it. It says Instagram doesn't support this use case.

Confusing...

@bogdanripa

This comment has been minimized.

Show comment
Hide comment
@bogdanripa

bogdanripa Jun 2, 2016

This access_token solution does not sound like a secure option though...

bogdanripa commented Jun 2, 2016

This access_token solution does not sound like a secure option though...

@jonnyjaniero

This comment has been minimized.

Show comment
Hide comment
@jonnyjaniero

jonnyjaniero Jun 2, 2016

I'm using it to pull tags on product page of woocommerce site.
Generating a new token and including it seemed to fixed my problem

Token:
http://instagramwordpress.rafsegat.com/docs/get-access-token/

var feed = new Instafeed({ get: 'tagged', tagName: 'YOUR_TAG_NAME', userId: 'YOUR_USER_ID', accessToken: 'YOUR_ACCESS_TOKEN', sortBy: 'most-recent', limit: '100' }); feed.run();

jonnyjaniero commented Jun 2, 2016

I'm using it to pull tags on product page of woocommerce site.
Generating a new token and including it seemed to fixed my problem

Token:
http://instagramwordpress.rafsegat.com/docs/get-access-token/

var feed = new Instafeed({ get: 'tagged', tagName: 'YOUR_TAG_NAME', userId: 'YOUR_USER_ID', accessToken: 'YOUR_ACCESS_TOKEN', sortBy: 'most-recent', limit: '100' }); feed.run();

@Rubicrash

This comment has been minimized.

Show comment
Hide comment
@Rubicrash

Rubicrash Jun 2, 2016

@jonnyjaniero Fantastic! It worked for me. Thank you very much

Rubicrash commented Jun 2, 2016

@jonnyjaniero Fantastic! It worked for me. Thank you very much

@leo07vasp

This comment has been minimized.

Show comment
Hide comment
@leo07vasp

leo07vasp Jun 2, 2016

@jonnyjaniero how work this ? get pictures with tag ?

leo07vasp commented Jun 2, 2016

@jonnyjaniero how work this ? get pictures with tag ?

@jehzlau

This comment has been minimized.

Show comment
Hide comment
@jehzlau

jehzlau Jun 2, 2016

Same here. It stopped working just 24 hours ago. I thought I'm alone, good thing I'm not. :D

jehzlau commented Jun 2, 2016

Same here. It stopped working just 24 hours ago. I thought I'm alone, good thing I'm not. :D

@safarious

This comment has been minimized.

Show comment
Hide comment
@safarious

safarious Jun 2, 2016

Is there some one already working on a fix for this?

safarious commented Jun 2, 2016

Is there some one already working on a fix for this?

@jehzlau

This comment has been minimized.

Show comment
Hide comment
@jehzlau

jehzlau Jun 2, 2016

@benrellick awesome it works. Thanks for sharing! Yay!

I used this one to generate my access token before: http://www.pinceladasdaweb.com.br/instagram/access-token/

Currently, it doesn't work. Maybe the app by pinceladasdaweb.com.br needs to be approved first, because I assume it's currently in Sandbox Mode. :D

So for those who encountered the same problem, let's just generate a new access token via http://instagram.pixelunion.net/

jehzlau commented Jun 2, 2016

@benrellick awesome it works. Thanks for sharing! Yay!

I used this one to generate my access token before: http://www.pinceladasdaweb.com.br/instagram/access-token/

Currently, it doesn't work. Maybe the app by pinceladasdaweb.com.br needs to be approved first, because I assume it's currently in Sandbox Mode. :D

So for those who encountered the same problem, let's just generate a new access token via http://instagram.pixelunion.net/

@jehzlau

This comment has been minimized.

Show comment
Hide comment
@jehzlau

jehzlau Jun 2, 2016

@safarious - yes you can generate a new access token here http://instagram.pixelunion.net/

jehzlau commented Jun 2, 2016

@safarious - yes you can generate a new access token here http://instagram.pixelunion.net/

@safarious

This comment has been minimized.

Show comment
Hide comment
@safarious

safarious Jun 2, 2016

@jehzlau so I need to add two properties now?:

  • accessToken: 'XXXX',
  • clientId: 'XXXX,

safarious commented Jun 2, 2016

@jehzlau so I need to add two properties now?:

  • accessToken: 'XXXX',
  • clientId: 'XXXX,
@jehzlau

This comment has been minimized.

Show comment
Hide comment
@jehzlau

jehzlau Jun 2, 2016

@safarious there's an accesstoken and clientID before. You just need to replace it. :) Or if you don't have one, you just need to add it. O__O

Check out the comment by @benrellick above. :)

jehzlau commented Jun 2, 2016

@safarious there's an accesstoken and clientID before. You just need to replace it. :) Or if you don't have one, you just need to add it. O__O

Check out the comment by @benrellick above. :)

@safarious

This comment has been minimized.

Show comment
Hide comment
@safarious

safarious Jun 2, 2016

@jehzlau thank you for your fast response - where do I get the userId ?

safarious commented Jun 2, 2016

@jehzlau thank you for your fast response - where do I get the userId ?

@undergroundmedia

This comment has been minimized.

Show comment
Hide comment
@undergroundmedia

undergroundmedia Jun 2, 2016

The user ID is very simple as it can be seen within the Access Tokens.
It will be the first 8-9 charcters before the . for example:

12345678.abcd4567789

undergroundmedia commented Jun 2, 2016

The user ID is very simple as it can be seen within the Access Tokens.
It will be the first 8-9 charcters before the . for example:

12345678.abcd4567789

@JoshHiggins

This comment has been minimized.

Show comment
Hide comment
@JoshHiggins

JoshHiggins Jun 2, 2016

The http://instagram.pixelunion.net/ token works for user feeds, but not hashtag or location based feeds. Anyone have a line on a place to get these feeds?

JoshHiggins commented Jun 2, 2016

The http://instagram.pixelunion.net/ token works for user feeds, but not hashtag or location based feeds. Anyone have a line on a place to get these feeds?

@thefunkybassist

This comment has been minimized.

Show comment
Hide comment
@thefunkybassist

thefunkybassist Jun 2, 2016

@JoshHiggins apparently Instagram changed their API functionality so now you can't get public hashtag feeds. Only your own user feed. Ridiculous but true!

thefunkybassist commented Jun 2, 2016

@JoshHiggins apparently Instagram changed their API functionality so now you can't get public hashtag feeds. Only your own user feed. Ridiculous but true!

@undergroundmedia

This comment has been minimized.

Show comment
Hide comment
@undergroundmedia

undergroundmedia Jun 2, 2016

Tags are a problem but they do present an intellectual property issue in that you are displaying what you do not have the rights to broadcast so there should be strict control of that.

undergroundmedia commented Jun 2, 2016

Tags are a problem but they do present an intellectual property issue in that you are displaying what you do not have the rights to broadcast so there should be strict control of that.

@waynejuckts

This comment has been minimized.

Show comment
Hide comment
@waynejuckts

waynejuckts Jun 13, 2016

@dreshadwilliams
could you share your configuration? thats not working for me. Is public hashtag for images working for someone?

waynejuckts commented Jun 13, 2016

@dreshadwilliams
could you share your configuration? thats not working for me. Is public hashtag for images working for someone?

@waynejuckts

This comment has been minimized.

Show comment
Hide comment
@waynejuckts

waynejuckts Jun 13, 2016

@despecial
with your link i got:

Error from Instagram: This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions.

waynejuckts commented Jun 13, 2016

@despecial
with your link i got:

Error from Instagram: This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions.

@yomguy

This comment has been minimized.

Show comment
Hide comment
@yomguy

yomguy Jun 13, 2016

Here is a tiny django tag displaying a hashtag gallery (adapted from @Bolandish PHP one, thanks!):
https://gist.github.com/yomguy/adaf032f6713e8abf55977a25f32d4f1

yomguy commented Jun 13, 2016

Here is a tiny django tag displaying a hashtag gallery (adapted from @Bolandish PHP one, thanks!):
https://gist.github.com/yomguy/adaf032f6713e8abf55977a25f32d4f1

@dreshadwilliams

This comment has been minimized.

Show comment
Hide comment
@dreshadwilliams

dreshadwilliams Jun 15, 2016

@waynejuckts
If you're looking to get other account feeds, I haven't tried that. I've only used my own, but here's my code:

var userFeed = new Instafeed({
    get: 'user', useHttp: true, 
    limit: 12, 
    resolution: 'standard_resolution', 
    userId: 1500521979, 
    accessToken: '1500521979.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 
    clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 
}); 

dreshadwilliams commented Jun 15, 2016

@waynejuckts
If you're looking to get other account feeds, I haven't tried that. I've only used my own, but here's my code:

var userFeed = new Instafeed({
    get: 'user', useHttp: true, 
    limit: 12, 
    resolution: 'standard_resolution', 
    userId: 1500521979, 
    accessToken: '1500521979.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 
    clientId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 
}); 
@szsoomro

This comment has been minimized.

Show comment
Hide comment
@szsoomro

szsoomro Jun 16, 2016

Hello. This code works for me; however, I want to specify the width and height of the images and also have spacing between the images. How do I do that? Please help!

szsoomro commented Jun 16, 2016

Hello. This code works for me; however, I want to specify the width and height of the images and also have spacing between the images. How do I do that? Please help!

@PrestaShark

This comment has been minimized.

Show comment
Hide comment
@PrestaShark

PrestaShark Jun 17, 2016

@brucenorton many thanks for the solution. Finaly works 👍 :)

PrestaShark commented Jun 17, 2016

@brucenorton many thanks for the solution. Finaly works 👍 :)

@OmarElGabry

This comment has been minimized.

Show comment
Hide comment
@OmarElGabry

OmarElGabry Jul 2, 2016

Here is a way for getting hashtags. But, what are the downsides of getting the hashtags through this request?

OmarElGabry commented Jul 2, 2016

Here is a way for getting hashtags. But, what are the downsides of getting the hashtags through this request?

@wlittler

This comment has been minimized.

Show comment
Hide comment
@wlittler

wlittler Jul 26, 2016

So maybe this is a dumb question, but how do I protect the access token? If I need to include it in my script somewhere, how can I prevent someone from viewing the source / inspecting with dev tools and copying the access token?

wlittler commented Jul 26, 2016

So maybe this is a dumb question, but how do I protect the access token? If I need to include it in my script somewhere, how can I prevent someone from viewing the source / inspecting with dev tools and copying the access token?

@bluesix

This comment has been minimized.

Show comment
Hide comment
@bluesix

bluesix Jul 26, 2016

@wlittler Tokens are locked to the userID. They can't be re-purposed for a different account. A token can only view the feed associated with its ID.

bluesix commented Jul 26, 2016

@wlittler Tokens are locked to the userID. They can't be re-purposed for a different account. A token can only view the feed associated with its ID.

@wlittler

This comment has been minimized.

Show comment
Hide comment
@wlittler

wlittler Jul 28, 2016

The reason I ask is a few people have said "Protect this token like you
would your password", so I am concerned about it being relatively easy to
find with the appropriate knowledge.

On Mon, Jul 25, 2016 at 10:31 PM, bluesix notifications@github.com wrote:

@wlittler https://github.com/wlittler Tokens are locked to the userID.
They can't be re-purposed for a different account. A token can only view
the feed associated with its ID.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#408 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGrlSmRM9lC153GbJY5gDMyAdtCf87l0ks5qZX94gaJpZM4IsCox
.

wlittler commented Jul 28, 2016

The reason I ask is a few people have said "Protect this token like you
would your password", so I am concerned about it being relatively easy to
find with the appropriate knowledge.

On Mon, Jul 25, 2016 at 10:31 PM, bluesix notifications@github.com wrote:

@wlittler https://github.com/wlittler Tokens are locked to the userID.
They can't be re-purposed for a different account. A token can only view
the feed associated with its ID.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#408 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGrlSmRM9lC153GbJY5gDMyAdtCf87l0ks5qZX94gaJpZM4IsCox
.

@coolwebs

This comment has been minimized.

Show comment
Hide comment
@coolwebs

coolwebs Aug 17, 2016

If I am just using Instafeed to display an image "widget" tile in a homepage grid, that gets susbstantial traffic - will it keep working in Sandbox mode? I used the pixelunion method above to generate the token a few months ago and fortunately it is still working OK. I have created the app on the same account where the images are being requested.

My big concern is the API rate limit. This web page is still in production and gets very light traffic (just our dev team). I am really worried about what will happen when it goes live and gets more than 500 requests per hour. Obviously I cannot submit it for review to make it go live as Instagram has pretty much walled that off for every scenario that I want to use this app for.

coolwebs commented Aug 17, 2016

If I am just using Instafeed to display an image "widget" tile in a homepage grid, that gets susbstantial traffic - will it keep working in Sandbox mode? I used the pixelunion method above to generate the token a few months ago and fortunately it is still working OK. I have created the app on the same account where the images are being requested.

My big concern is the API rate limit. This web page is still in production and gets very light traffic (just our dev team). I am really worried about what will happen when it goes live and gets more than 500 requests per hour. Obviously I cannot submit it for review to make it go live as Instagram has pretty much walled that off for every scenario that I want to use this app for.

@miseixas

This comment has been minimized.

Show comment
Hide comment
@miseixas

miseixas Aug 20, 2016

Does anyone have an option for a Follow Button? The one I always use (instafollowbutton.com) is broken too :( Can't find anything working...

miseixas commented Aug 20, 2016

Does anyone have an option for a Follow Button? The one I always use (instafollowbutton.com) is broken too :( Can't find anything working...

@l-landier

This comment has been minimized.

Show comment
Hide comment
@l-landier

l-landier Aug 23, 2016

Hello,
the instafeed is working for me, but it's publishing every post twice.
Wich means if I do limit:"4", I'll get 8 post, with every post in double (4 different images twice).

Anyone knows why?

l-landier commented Aug 23, 2016

Hello,
the instafeed is working for me, but it's publishing every post twice.
Wich means if I do limit:"4", I'll get 8 post, with every post in double (4 different images twice).

Anyone knows why?

@bluesix

This comment has been minimized.

Show comment
Hide comment
@bluesix

bluesix Aug 23, 2016

@l-landier my guess is you're calling the function twice. Post your source or URL.

bluesix commented Aug 23, 2016

@l-landier my guess is you're calling the function twice. Post your source or URL.

@CruelMoney

This comment has been minimized.

Show comment
Hide comment
@CruelMoney

CruelMoney Aug 24, 2016

Anyone experienced that their token expired again? I've not found a way to programmatically generate tokens without redirecting to a login page.
It is not very ideal that clients have to generate new tokens now and then when they see the feed is broken.
Any solutions to pulling client feeds without having them to generate tokens or having the users login?

CruelMoney commented Aug 24, 2016

Anyone experienced that their token expired again? I've not found a way to programmatically generate tokens without redirecting to a login page.
It is not very ideal that clients have to generate new tokens now and then when they see the feed is broken.
Any solutions to pulling client feeds without having them to generate tokens or having the users login?

@benweltman

This comment has been minimized.

Show comment
Hide comment
@benweltman

benweltman Oct 26, 2016

For anyone still experiencing issues with their instafeed - as of Sept/ Oct 2016

I have just fixed mine by following a mixture of the advice presented above, but I found it difficult to work out which bits to apply and for what result etc. So to help anyone else out there, here's what I did/ the requirements to get a working insta feed...

User based instagram feed - for those who only want a feed of one user's photos:

Then once you have those data items, your code should look something like:
// Instafeed var feed = new Instafeed({ get: 'user', userId: '123456789', clientId: 'f7kg85kf96u6jf85l69483k', accessToken: '123456789.f66ed08.48613c13235740a5bf5618e0b9652d35', sortBy: 'most-recent', limit: '100' }); feed.run();

I have of course swapped out my actual userId, clientId and accessToken but you should get the gist now.

With jquery and instafeed script initialized in the header (of html doc etc), this code and process worked for me with no issues.

Also, worth mentioning that once you have a correct access token, you can use the same one for a hashtag based feed, you just need to change your code and actually a hashtag feed requires less from you...

Hashtag based instagram feed - for those who want a feed of photos based on a hastag:

And for this type of feed your code should look something like:
// Instafeed var feed = new Instafeed({ get: 'tagged', tagName: 'twiglets', accessToken: '123456789.f66ed08.48613c13235740a5bf5618e0b9652d35', sortBy: 'most-recent', limit: '21' }); feed.run();

To get your access token for either of these scenarios, only use this link:
http://instagramwordpress.rafsegat.com/docs/get-access-token/

This is because this site adds the VERY important public_content scope as a parameter in the url for the access token, which is essentially what allows you to display hashtag content as it is considered an iffy subject under copyright and so on. YOU DO NOT NEED TO GET APPROVAL from instagram. No matter what the others have said above.

benweltman commented Oct 26, 2016

For anyone still experiencing issues with their instafeed - as of Sept/ Oct 2016

I have just fixed mine by following a mixture of the advice presented above, but I found it difficult to work out which bits to apply and for what result etc. So to help anyone else out there, here's what I did/ the requirements to get a working insta feed...

User based instagram feed - for those who only want a feed of one user's photos:

Then once you have those data items, your code should look something like:
// Instafeed var feed = new Instafeed({ get: 'user', userId: '123456789', clientId: 'f7kg85kf96u6jf85l69483k', accessToken: '123456789.f66ed08.48613c13235740a5bf5618e0b9652d35', sortBy: 'most-recent', limit: '100' }); feed.run();

I have of course swapped out my actual userId, clientId and accessToken but you should get the gist now.

With jquery and instafeed script initialized in the header (of html doc etc), this code and process worked for me with no issues.

Also, worth mentioning that once you have a correct access token, you can use the same one for a hashtag based feed, you just need to change your code and actually a hashtag feed requires less from you...

Hashtag based instagram feed - for those who want a feed of photos based on a hastag:

And for this type of feed your code should look something like:
// Instafeed var feed = new Instafeed({ get: 'tagged', tagName: 'twiglets', accessToken: '123456789.f66ed08.48613c13235740a5bf5618e0b9652d35', sortBy: 'most-recent', limit: '21' }); feed.run();

To get your access token for either of these scenarios, only use this link:
http://instagramwordpress.rafsegat.com/docs/get-access-token/

This is because this site adds the VERY important public_content scope as a parameter in the url for the access token, which is essentially what allows you to display hashtag content as it is considered an iffy subject under copyright and so on. YOU DO NOT NEED TO GET APPROVAL from instagram. No matter what the others have said above.

@surjithctly

This comment has been minimized.

Show comment
Hide comment
@surjithctly

surjithctly Jan 20, 2017

I have fixed the This client has not been approved to access this resource Issue by Authorizing the Instagram public_content scope by visiting the following URL and clicking Authorize.

https://api.instagram.com/oauth/authorize/?client_id=[YOUR_CLIENT_ID]&redirect_uri=[YOUR_REDIRECT_URI]&scope=public_content&response_type=token

Hope this helps someone else.

~Surjith

surjithctly commented Jan 20, 2017

I have fixed the This client has not been approved to access this resource Issue by Authorizing the Instagram public_content scope by visiting the following URL and clicking Authorize.

https://api.instagram.com/oauth/authorize/?client_id=[YOUR_CLIENT_ID]&redirect_uri=[YOUR_REDIRECT_URI]&scope=public_content&response_type=token

Hope this helps someone else.

~Surjith

@mikedzl

This comment has been minimized.

Show comment
Hide comment
@mikedzl

mikedzl Feb 2, 2017

surjithctly - I did the same and got a "{"error_message": "Implicit authentication is disabled", "code": 403, "error_type": "OAuthForbiddenException"}"

I tried another client id I had generated for this client and did get the "authorize" button but the page it redirected too after that said "Sorry, this page isn't available." This was the resulting URL without my specific info => https://www.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=IP_OF_TEST_SERVER&response_type=code&scope=basic+public_content+follower_list+comments+relationships+likes

Has anyone discovered a way around this?

mikedzl commented Feb 2, 2017

surjithctly - I did the same and got a "{"error_message": "Implicit authentication is disabled", "code": 403, "error_type": "OAuthForbiddenException"}"

I tried another client id I had generated for this client and did get the "authorize" button but the page it redirected too after that said "Sorry, this page isn't available." This was the resulting URL without my specific info => https://www.instagram.com/oauth/authorize/?client_id=CLIENTID&redirect_uri=IP_OF_TEST_SERVER&response_type=code&scope=basic+public_content+follower_list+comments+relationships+likes

Has anyone discovered a way around this?

@amirhaman

This comment has been minimized.

Show comment
Hide comment
@amirhaman

amirhaman Apr 24, 2017

Getting tagged insta post.
result: Error from Instagram: This client has not been approved to access this resource.

I'm using following code to the the instafeed:

var feed = new Instafeed({ get: 'tagged', tagName: 'TAG_NAME', userId: 'MY_USER_ID', accessToken: 'ACCESS_CODE_GENERATED_BY_ http://instagram.pixelunion.net/'

});
feed.run();

I need to get only posts which having " #TAG_NAME "

More info:

I can manage to get all the posts if I change get value to "user" and it will populate all the images.

any solutions to get only the tagged images?

amirhaman commented Apr 24, 2017

Getting tagged insta post.
result: Error from Instagram: This client has not been approved to access this resource.

I'm using following code to the the instafeed:

var feed = new Instafeed({ get: 'tagged', tagName: 'TAG_NAME', userId: 'MY_USER_ID', accessToken: 'ACCESS_CODE_GENERATED_BY_ http://instagram.pixelunion.net/'

});
feed.run();

I need to get only posts which having " #TAG_NAME "

More info:

I can manage to get all the posts if I change get value to "user" and it will populate all the images.

any solutions to get only the tagged images?

@torfh

This comment has been minimized.

Show comment
Hide comment
@torfh

torfh Apr 27, 2017

Thanks it worked for me - you cannot use the accessToken provided at instagram developer site, you must:

  1. get the original access token - (the one that used to work but now it doesn't)
    1.2. (heres steps to get the fist token: https://www.instagram.com/developer/authentication/)
  2. go to this site : http://instagramwordpress.rafsegat.com/docs/get-access-token/. and at the buttom you'll see: "generate your access token", paste the access token from step 1 in here.
  3. then generate new access token ,put the new access token into your code.

The guide at instafeedjs.com should be updated with this information for future coders :)

I am making a website and the feed is wrapped into a html div tag.
Heres what my code looks like:

</div>
<script type="text/javascript">
	var userFeed = new Instafeed({
	get: 'tagged',
	tagName: 'flam****t',
	accessToken: '1909*****5.ba4c844.323da3b77**********************',
	sortBy: 'most-recent',
	limit: '21' });
	userFeed.run();
	</script>
</div>

torfh commented Apr 27, 2017

Thanks it worked for me - you cannot use the accessToken provided at instagram developer site, you must:

  1. get the original access token - (the one that used to work but now it doesn't)
    1.2. (heres steps to get the fist token: https://www.instagram.com/developer/authentication/)
  2. go to this site : http://instagramwordpress.rafsegat.com/docs/get-access-token/. and at the buttom you'll see: "generate your access token", paste the access token from step 1 in here.
  3. then generate new access token ,put the new access token into your code.

The guide at instafeedjs.com should be updated with this information for future coders :)

I am making a website and the feed is wrapped into a html div tag.
Heres what my code looks like:

</div>
<script type="text/javascript">
	var userFeed = new Instafeed({
	get: 'tagged',
	tagName: 'flam****t',
	accessToken: '1909*****5.ba4c844.323da3b77**********************',
	sortBy: 'most-recent',
	limit: '21' });
	userFeed.run();
	</script>
</div>
@danemacmillan

This comment has been minimized.

Show comment
Hide comment
@danemacmillan

danemacmillan Jun 9, 2017

Don't give access to some third-party site. You can generate your own access token.

http://www.logicalfeed.com/embedding-instagram-feed-in-your-website

danemacmillan commented Jun 9, 2017

Don't give access to some third-party site. You can generate your own access token.

http://www.logicalfeed.com/embedding-instagram-feed-in-your-website

@clintonqwert

This comment has been minimized.

Show comment
Hide comment
@clintonqwert

clintonqwert Jun 13, 2018

@rorysmorris
Thanks! This still works!
http://instagramwordpress.rafsegat.com/docs/get-access-token/
the link above grants permission for both the basic and public_content scope.

ACCESS TOKEN = http://instagramwordpress.rafsegat.com/docs/get-access-token/
var userFeed = new Instafeed({
get: 'tagged', // also works with location + locationId
tagName: 'TAGNAME',
accessToken: 'ACCESS_TOKEN'
});
userFeed.run();

clintonqwert commented Jun 13, 2018

@rorysmorris
Thanks! This still works!
http://instagramwordpress.rafsegat.com/docs/get-access-token/
the link above grants permission for both the basic and public_content scope.

ACCESS TOKEN = http://instagramwordpress.rafsegat.com/docs/get-access-token/
var userFeed = new Instafeed({
get: 'tagged', // also works with location + locationId
tagName: 'TAGNAME',
accessToken: 'ACCESS_TOKEN'
});
userFeed.run();

@benjamin-hull

This comment has been minimized.

Show comment
Hide comment
@benjamin-hull

benjamin-hull Jun 19, 2018

Collaborator

@clintonqwert - That's interesting! Obviously an app that got through before IG tightened everything up. Be aware (if you're not already) public_content is going away on December 11, 2018 , leaving only basic scope until 2020.

@danemacmillan - the issue with self-generating tokens from your own 'app' is that you'll be permanently in basic/sandbox mode, which limits what media you can access. @rorysmorris link will give you a public_content token which will work for any user (until they turn it off, anyway - up to you whether it's worth investing in for a few months access).

Collaborator

benjamin-hull commented Jun 19, 2018

@clintonqwert - That's interesting! Obviously an app that got through before IG tightened everything up. Be aware (if you're not already) public_content is going away on December 11, 2018 , leaving only basic scope until 2020.

@danemacmillan - the issue with self-generating tokens from your own 'app' is that you'll be permanently in basic/sandbox mode, which limits what media you can access. @rorysmorris link will give you a public_content token which will work for any user (until they turn it off, anyway - up to you whether it's worth investing in for a few months access).

@stale

This comment has been minimized.

Show comment
Hide comment
@stale

stale bot Sep 17, 2018

This issue has been automatically marked as stale because it hasn't had new comments in the last 3 months. It will be closed if no further activity occurs. If you still need assistance with this issue, or believe it shouldn't be closed, please respond with a new comment to let us know.
Thank you all for your contributions.

stale bot commented Sep 17, 2018

This issue has been automatically marked as stale because it hasn't had new comments in the last 3 months. It will be closed if no further activity occurs. If you still need assistance with this issue, or believe it shouldn't be closed, please respond with a new comment to let us know.
Thank you all for your contributions.

@stale stale bot added the stale label Sep 17, 2018

@stale stale bot closed this Sep 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment