stevenschobert / instafeed.js

A simple Instagram JavaScript plugin for your website
https://instafeedjs.com
MIT License
3.51k stars 859 forks source link

Changes to Instagram API policy has broken Instafeed #408

Closed TamaEaston closed 6 years ago

TamaEaston commented 8 years ago

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 commented 8 years ago

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

mikeden commented 8 years ago

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

benrellick commented 8 years ago

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 commented 8 years ago

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

thomaskimura commented 8 years ago

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

mikeden commented 8 years ago

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

rachelrianne commented 8 years ago

@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 commented 8 years ago

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 commented 8 years ago

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

bluesix commented 8 years ago

@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 commented 8 years ago

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

uxgenesis commented 8 years ago

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 commented 8 years ago

@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.

uxgenesis commented 8 years ago

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 commented 8 years ago

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

jonnyjaniero commented 8 years ago

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 commented 8 years ago

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

leo07vasp commented 8 years ago

@jonnyjaniero how work this ? get pictures with tag ?

jehzlau commented 8 years ago

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

safarious commented 8 years ago

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

jehzlau commented 8 years ago

@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 8 years ago

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

safarious commented 8 years ago

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

jehzlau commented 8 years ago

@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 commented 8 years ago

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

rbairstow commented 8 years ago

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 commented 8 years ago

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?

uxgenesis commented 8 years ago

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

rbairstow commented 8 years ago

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.

cesarvelame commented 8 years ago

I'm getting error 429, too many requests.

Failed to load resource: the server responded with a status of 429 ()

safarious commented 8 years ago

@undergroundmedia @jehzlau @jonnyjaniero Hey Guys I've just added the userId & accessToken but I do get following error: Error from Instagram: This client has not been approved to access this resource. (I've got the similar implementation as you do @jonnyjaniero )

Do someone know a fix for this?

rbairstow commented 8 years ago

@safarious Where did you get the Access token from?

safarious commented 8 years ago

@undergroundmedia I've got it from here: http://instagram.pixelunion.net/ but it seems that they do not work for that usecase if I take the accesToken from here: http://instagramwordpress.rafsegat.com/docs/get-access-token/ it works.

rbairstow commented 8 years ago

Could be Pixel Unions client having issues from Instagram? We are still waiting for them to pull their finger out and restore ours to live instead of Sandbox which is causing a lot of issues here for our support guys.

Half tempted to throw out an instruction doc on how to create a client and generate your own tokens for Sandbox only just to show your own images on your own site but it is a lot to ask for non coding users to have to go through.

codytooker commented 8 years ago

So before I was using this to simply pull in my clients instagram feeds to their site. I was able to pull in anyone's feed with my secret key. Now it seems like you are only allowed to pull in your own instagram images is this correct?

So every client needs to generate a new access token in order for this to work again. Thats kind of a bummer

djrasmusp commented 8 years ago

Anybody that knows of where i can get a Access Token, that does have the "non-square"-setting enabled ?

rorysmorris commented 8 years ago

You will not need every client to generate a new access token. Creating an access token here, from your own account will fix the issue: http://instagramwordpress.rafsegat.com/docs/get-access-token/ - PixelUnion doesn't work.

rbairstow commented 8 years ago

@TamaEaston We have our app approved and live so if you are trying to gain the Access tokens for user only feeds in your Shopify themes here is the URL for that: http://www.shopifythemes.net/pages/instagram/

benrellick commented 8 years ago

Nice, thanks @rorysmorris!

The access token generated at http://instagramwordpress.rafsegat.com/docs/get-access-token/ grants permission for both the basic and public_content scope.

BMCwebdev commented 8 years ago

Any way to generate an access token without giving access to these other apps?

crnr commented 8 years ago

Is there any possibility to get specific hashtag's within this newest API changes ?

Thanks guys

Rubicrash commented 8 years ago

For hashtags: get a new access token from http://instagramwordpress.rafsegat.com/docs/get-access-token/ (or http://instagram.pixelunion.net/ , ..)

var feed = new Instafeed({ get: 'tagged', tagName: '{{ hastag }}', userId: '{{ your-user-id }}', accessToken: '{{ access-token}}', }); feed.run();

droozh commented 8 years ago

You can get access to user feed who gave you access to his data . Before 01.06.2016 you could get data of any users feed without permission. That's the problem. Everything changed. Now you should parse needed information without api.

ronilaukkarinen commented 8 years ago

@jonnyjaniero Thanks a lot, you're saved my day! I was able to generate accessTokens for my own apps, but they don't have sufficient permissions to display public data and new permissions can't be applied any longer as Instagram forbids it. Your trick obviously generates accessToken with public_content rights. Working great. Many, many thanks.

ghost commented 8 years ago

I can't get an access_token. I went to the URL in the docs (https://instagram.com/oauth/authorize/?client_id=YOURCLIENTIDHERE&redirect_uri=HTTP://YOURREDIRECTURLHERE.COM&response_type=token) and it had a button to authorize along with a message about how only sandbox users can authorize. I clicked the button and it sent me to a 404. Now the URL that originally gave me the authorize screen is just a 404 too. Frustrating. :(

PandaStyle commented 8 years ago

For how long are these generated access tokens going to last? The official docs says you shouldn't count with them forever.

And also if a large amount of poeple are going to use access tokens generated form the same clientID (in this case Wordpress or Shopify), isn't the hourly request amount going to reach the limit (5000) quickly?

itslemcy commented 8 years ago

it's still broken for me

yomguy commented 8 years ago

http://instagramwordpress.rafsegat.com/docs/get-access-token/ worked for me but not http://instagram.pixelunion.net/

Hurmeli commented 8 years ago

Does Instafeed work at all anymore? I'm trying to get my own feed via

get: 'user', userdId: 'xxx', accessToken: 'xxx', sortBy: 'most-recent', clientId: 'xxx',

But nothing comes out. Token is new, in fact the whole app is new and it has permissions. Being a simple graphic designer, I'm unfortunately out of my depth with this. :'(

M1chaelc commented 8 years ago

I'm also getting error 429, too many requests. Failed to load resource: the server responded with a status of 429 ()

My app is in sandbox mode and therefore limited to 500 requests per hour. Is there an easy way to cache the results or alternatively get it out of sandbox?