stevenschobert/instafeed.js — pull request #52 by neilcampbell (2013-12-24 01:03:35+00:00)
Title: Adding sortBy none and adjusting sortBy most-recent to perform the most ...

__Scenario__
Given I create my first Instagram photo
And 2 hours later I create my second Instagram photo
When I tag with a comment my first Instagram photo 3 hours after I created it
And I am using the Instafeed tagged get
And I am using the Instafeed most-recent sort by
Then I should see my first Instagram photo last and my second Instagram photo first

Currently, the above scenario will fail and the first photo will display first and the second will display last.
This pull request fixes the sorting, so the above scenario is correct.

__Details__
When doing an Instagram tag search, it appears that Instagram will return the order based on when the photo was actually tagged. So tagging a photo using a comment will change the photo posting order, especially when you come back much later and tag a bunch of older photos.

To cater for this I have add a sortBy 'none' option (and made that default to keep backward compatibility) which will display the images in the same order they are returned from Instagram. Additionally sortBy 'most-recent' will now perform the sort based on the created_time.