I've recently updated a website that uses the Instafeed.js plugin from the old version to the new one. In the previous version the 'sortBy' option worked with a few possible strings e.g. number of likes ("likes.count"), number of comments ("comments.count") etc.
In the new version, the 'sortBy' option has been replaced by a 'sort' option, and as you can see on this page, it says that it 'uses a function' instead of the simple preset options as in the previous version.
https://github.com/stevenschobert/instafeed.js/wiki/Version-2-migration-guide
My Javascript knowledge is basic, and I've not come across something like this in a js plugin before. I don't really understand how I can write a function to sort the posts from the feed by the number of likes, since I can't see where the number of likes is made available from the Instagram API. If you'd like me to share the live website as it currently is, I'm happy to do so.
If anyone could point me in the right direction it would be really appreciated.
Thanks