Created
September 19, 2018 14:47
-
-
Save geoclaps/12e23c46644782fc9be3b78e04e7d10a to your computer and use it in GitHub Desktop.
Using Instafeed.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//include jquery in your html | |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js'></script> | |
//include instafeed.js | |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/instafeed.js/1.4.1/instafeed.min.js'></script> | |
//add javascript | |
jQuery(document).ready(function() { | |
var instaFeed = new Instafeed({ | |
target: 'idTag', //use this when you want to use more than one feed on a page | |
get: 'user', | |
userId: '...', | |
limit: '12', | |
resolution: 'low_resolution', | |
accessToken: '...', | |
sortBy: 'most-recent', | |
template: '<div class="instagram-item"><a href="{{image}}" title="{{caption}}" target="_blank"><img src="{{image}}" alt="{{title}}" /></a></div>', | |
}); | |
instaFeed.run(); | |
}); | |
//call the feeds in your html | |
<div id="idTag"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment