Problem getting tags filter to work #209

Closed
MrDesigna opened this Issue Dec 10, 2014 · 5 comments

Projects

None yet

4 participants

@MrDesigna

Just a note which may help others out. When using the image filtering

filter: function(image) {
return image.tags.indexOf('thetagname') >= 0;
}

thetagname must be lower case. I spent ages trying to figure out why Thetagname was not working

@MrDesigna

Also note that the accessToken is also required however the example provided does not show this. Thank you developer however instructions could do with being revisited.

@rhysburnie

Its not up to the developer of this API to teach you how to authorize - read Instagrams API

@MrDesigna

Absolutely agree however its always nice to add pointers to help others out.

@stevenschobert
Owner

Thank you for sharing @MrDesigna! Sorry about the confusion over tag names! If it helps, I always do a console.log(image) inside my function so I can look at what data the image has. There's also another issue (#21) that covers what data is in the API response.

Also, the access token is only required if you are fetching images from your own account. If you were filtering images fetched from the "popular" tab, you can get by with only a client Id. But you are correct that I did not specify that in the docs!

Again, thanks for the input!

@thunderkee

Hello, I am a noob trying to fetch image of a user(myself) with selected tag(ex:'vsco'). I tried sample from instafeed.js web, but it didn't work. It worked just when I removed the filter function. What am I doing wrong?
Here's the code :

<script type="text/javascript"> var feed = new Instafeed({ get: 'user', userId: xxx535466, filter: function(image) { return image.tags.indexOf('vsco') >= 0; }, clientId: 'xxx26456d268470b95f3a621df85f4f1', accessToken: 'xxx535466.xxxede5.xxx822de6ad94ff6a574dd7882abba85', resolution: 'low_resolution', useHttp: 'true', sortBy: 'most-liked', limit:4, template: '', }); feed.run(); </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment