stevenschobert / instafeed.js

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

Is Instafeed.js still working? #420

Closed designifyer closed 6 years ago

designifyer commented 8 years ago

Thank you for the awesome plugin but it doesn't seem to work anymore, did the api from Instagram change? I see it doesn't work on your demo too.

koddr commented 8 years ago

Hmm.. on my site Instafeed.js working with no problem. Check your browser/device/etc. Problem on your side (99%).

vlrprbttst commented 8 years ago

@designifyer check this out: https://github.com/stevenschobert/instafeed.js/issues/408

A change to the instagram api broke it. Try generating a new access token here: http://instagram.pixelunion.net/ (while logged on instagram) and use the new one instead. fixed the problem for me.

rdetert commented 8 years ago

Thank you, this was driving me nuts. After all this time, Instagram still makes access tokens a huge pain.

designifyer commented 8 years ago

It works now, thank you @vlrprbttst

SS88UK commented 8 years ago

Not working for me:

Error from Instagram: This client has not been approved to access this resource.

designifyer commented 8 years ago

I used to have this error when I used an access token from another account than the one I was pulling the posts from.

SS88UK commented 8 years ago

Yep - you're right. This works if the account you're trying to pull from is your own. If it's not, you'll have to create a developer account with the username you want to display for.

MoradHamdy commented 8 years ago

you'll have to create a developer account

@SS88UK .. What does that mean? I still have problem where instafeed not working so far..

flyarrowplane commented 8 years ago

I tried @vlrprbttst's tip with no luck. I'm not trying to pull in by user, though. I'm pulling in a feed based on tags.

SS88UK commented 8 years ago

@MoradHamdy Go here: https://www.instagram.com/developer/

You can no longer have one developer account to pull multiple user's feeds. It's one developer account per user. So if you wanted to pull 20 feeds - that's 20 developer accounts you need to set-up.

flyarrowplane commented 8 years ago

@SS88UK So, then, tag-based feeds are no longer supported?

SS88UK commented 8 years ago

@MoradHamdy They do work. What's your code. Example below:

<script type="text/javascript"> var feed = new Instafeed({ get: 'tagged', tagName: 'awesome', clientId: 'YOUR_CLIENT_ID' }); feed.run(); </script>

flyarrowplane commented 8 years ago
var instafeed4perslideFeed = new Instafeed({
    target: 'instafeed4perslide',
    get: 'tagged',
    tagName: 'TAGNAME', 
    resolution: 'low_resolution',           
    clientId: 'CLIENTID',  
    template: '<a href="{{link}}" target="_blank"><img src="{{image}}" /></a>',
    sortBy: 'most-recent',
    limit:19,
    after: function() {

        // group items (if needed), then create cycle slideshow
        createCycleSlideShow(4);
    }
});
instafeed4perslideFeed.run();

It had been working from September 2015 and just stopped working recently. The site is an event site and the event has passed, so I'm thinking few people were noticing it missing. I'm guessing that the June 1 update caused it to break. I am getting the same error other people are noting in other issues here.

Error from Instagram: The access_token provided is invalid.

I am wondering if we now have to submit for permissions in order for our apps to work? I can't remember the mode my app was in in September, but it was in Sandbox Mode when I reviewed it yesterday. I have just now submitted for permission to see if this helps.

SS88UK commented 8 years ago

OK - you MUST generate an access token.

The Instagram API requires an access_token from authenticated users for each endpoint. We no longer support making requests using just the client_id.

https://www.instagram.com/developer/endpoints/

The URL examples throughout this documentation use ACCESS-TOKEN as a placeholder. For these examples to work, you need to substitute the value with your own access_token. In your application, you should have each user go through an authentication and authorization flow in order to receive a valid access_token.

flyarrowplane commented 8 years ago

Okay, thanks for this info. However, if I'm pulling in by a tag that an unlimited number of people may be using, then generating an access token per user is not feasible. Therefore, I'm not sure that it's possible to pull in tagged posts in this scenario. My site is for a now-passed event and we displayed Instagram posts by anyone who used a certain tag. Although the event is over, I'd still like for this to be functional.

SS88UK commented 8 years ago

@relish27 It sounds like you need to get your API submission approved otherwise you will have to generate it per user.

flyarrowplane commented 8 years ago

I thought I'd submitted mine yesterday, but checked it again and it started me on this questionnaire. I checked the option to use hashtag-based content and it looks like this is no longer supported.
instagram developer documentation

It's unclear to me if the first option (" I want to install a third party widget to show Instagram content on my website.") would work in the case of using Instafeed. The message at the bottom for this option is:

"You do not need to submit for review for this use case. Some widgets may ask you to register a new client ID, but you should not submit it for review for the widget to work. Your client can remain in sandbox mode and the widget will have access to your last 20 media. If you are having issues with the widget, please contact the owner of the widget directly."

SS88UK commented 8 years ago

@relish27 I also receive this notification - but it's not the case. I cannot retrieve the last 20 images.

bsullins commented 8 years ago

@relish27 that's what I'm getting also, did you figure it out?

notflip commented 8 years ago

Any news on this?

armyofda12mnkeys commented 8 years ago

I'm getting the last 20 pieces of content from my site successfully, but alas I want to filter the content to show a certain hashtag on the website... so only a couple items show up out of the 20. I'd think Instagram would setup a better querying mechanism for clients like Instafeed, so having a filter doesn't ding your 20 item limit. Seems kinda weak for such a large company :).

stu2you commented 8 years ago

Really not sure if this post is appropriate here so sorry in advance, love this plugin, instafeed JS I use it on a lot of my web sites. Is there a means to integrate swipe box lightbox plugin, as opposed to fancy box?

ryanbarsatan commented 7 years ago

This is a pretty late post but Instagram doesn't allow one off apps to display public content anymore. You can pretty much only show content from people in your sandbox. Creating cool projects around Instagram API is pretty much dead.

kgmorales commented 7 years ago

@ryanbarsatan I literally just set this up today and wondered why I wasn't able to display all the content, this is such a bummer.

SS88UK commented 7 years ago

You need to get an accessToken in order to display photos. Just don't use clientId when using accessToken.

This example will display 4 images at low resolution:

var feed = new Instafeed({ get: 'user', userId: '2707079415', accessToken: 'NUMBER-HERE', limit:4, template:'<a target="_blank" href="{{link}}"><img src="{{image}}" /></a>', resolution: 'low_resolution' }); feed.run();

kgmorales commented 7 years ago

@SS88UK right. I have that. The problem is that the API limits you to the last 20 images. So if you filter out by tagName, you're getting (assuming not all of the most recent 20 are the same hashtag) less than 20 images. Not 20 images total with the filtered hashtag. Which is what I just realized.

SS88UK commented 7 years ago

@gnarfugh does feed.next(); work? Not tried.

osahyoun commented 7 years ago

@gnarfugh not sure if it helps, but my fork uses bitsalad.co as a proxy - I'm limited to whatever instagram account I authorize bitsalad to access, but I'm getting back a lot more than 20 images.

kgmorales commented 7 years ago

@SS88UK i'm not sure i haven't tried that. but i think it has to load those images. Which wouldn't help my situation as I'm adding them to a slider.

RageItalic commented 7 years ago

Hi guys, After going through the access token hassle, I found this website that does it for you: http://instagram.pixelunion.net/

Also, I went through the same Error: Error from Instagram: This client has not been approved to access this resource. and couldn't find a work around or anything but I did find an easier (although not as great) alternative: https://snapwidget.com/ just sign up and give it the account name and it pulls up all the pictures for you and allows you to make certain "facial" changes but doesn't provide the freedom instafeed could have. On the bright side though, it does provide you with all the code to paste into your html (or ejs, etc) file so you dont need to do much work. I used it on my site and it worked just fine. Still would have loved to use instafeed though. Hope this helps.

sitnarf commented 7 years ago

For me, it works. I generated the token for me by https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=token and then used: var feed = new Instafeed({ get: 'user', userId: 'self', accessToken: TOKEN, limit:8 });

RubyRK commented 6 years ago

Hi, I'm new to this term of instafeed, I want to display the images from my instagram to a webstore. I followed all the steps. But finding a error every time like (Instafeed is not defined). Could any one please help me fix this. I think the source file is not been called. Is there any changes i should do to fix this please let me know. Thanks.

benjamin-hull commented 6 years ago

@RubyRK - that sounds like you're having trouble getting it running on the page. What you want to do should work, though. If you still need help, would you mind opening a new issue so we can close off this discussion, please? Thanks!

stale[bot] commented 6 years ago

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.