Photos I like and with hashtag #87

naderby opened this Issue Apr 17, 2014 · 11 comments


None yet

7 participants

naderby commented Apr 17, 2014

Great js guys, please forgive my limited knowledge but what code do I use to get photos I've liked (including my own) but also have a specific hashtag?


Hi @naderby
Unfortunately I don't think instafeed currently supports getting photos that a user has liked.


Hey @naderby!

Yeah, I'm sorry to say @neilcampbell is correct, there is no method for getting photos you like. Only for getting your public photos.

Sorry to disappoint!


This would be a great feature! I would gladly pay for this!


But wouldn't it be possible to get all photos with a specific hashtag, and then filter the right ones out using "user_has_liked"?

Edit: yep, that's working.
These are the settings I use to get pictures with a tag that a user has liked:

var feed = new Instafeed({
    target: 'TARGET_HERE',
    get: 'tagged',
    tagName: 'TAG_NAME_HERE',
    clientId: 'ID_HERE',
    limit: 60,
    userId: USER_ID_HERE,
    accessToken: 'TOKEN_HERE',
    filter: function(image) {
        return image.user_has_liked;
naderby commented May 15, 2014

@tanelkarp you awesome person!

image.user_has_liked; does not seem to be in the instafeed.js documentation.


@tanelkarp Ah, clever! I really like this approach 👍


@sethsanders My main reason for not adding the "photos you like method" was that it (at the time anyways) required a higher permission level in the accessToken, and I didn't really think it would be a good idea to encourage publicly exposing a token with special permissions in a JavaScript plugin. If that has since changed, I'm totally up for adding it :)

In the mean time, @tanelkarp's approach is a good option.


@naderby It's mostly undocumented because the image in that context is the data that comes straight from the API, not anything I manually added. However you can get a good idea of what all is in that image object by looking at #21.


@stevenschobert / @tanelkarp great script and very useful options provided. I have tried the above approach to get user liked images with a limit of 30. Everything worked fine till about a week back when it displayed about 24 images, now the script retrieves only 5 to 6 recently "liked" images.

Any idea on where my configuration is wrong! You can access this @
Script init below:

var imgFeed = new Instafeed({
    get: 'user',
    userId: 1513315715,
    clientId: '268a7fc8926b4d27b93dda847b33870b',
    accessToken: '1513315715.467ede5.a0bc1a1063e740e68cfeba1ed86172f6',
    resolution: 'thumbnail',
    template: '<div class="instabox"><div class="instabox-img"><img src="{{image}}" /></div><div class="instabox-temp"> </div><div class="instabox-info"><div class="instatitle">{{caption}}</div><div class="instaicon"><div class="instaicon-love"><div class="flaticon-heart13"></div></div><div class="instaicon-text"><a href="#"></a></div></div></div></div>',
    links: 'false',
    limit: 30,
    filter: function (image) {
        return image.user_has_liked;
$(document).ready(function () {
    if ($('#instafeed').length );

The above issue was resolved by setting the limit: -1

Further details are in these posts: #97 #23

nickfmc commented Nov 6, 2015

Just a heads up, using this filter with the new method of not using an access token but only the clientID doesn't seam to work, and the link to get an access token from the Instafeed site seams to have been removed with the last update so people still may need an access token I believe

filter: function(image) {
return image.user_has_liked;

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