Setting up Instafeed.js is pretty straight-forward - there are 3 main steps.
- Create a Facebook app linked to a Professional Instagram Account, and add yourself as a test user. See steps 1-6 of the official documentation
- Create an access token and provide it to an Instagram Token service. See Managing User Tokens.
- Add the instafeed.js script to your web page and provide some simple options. See Usage.
If you prefer to watch a video tutorial, check out this video which covers all the above steps.
Instafeed.js is compatible with all of the following loading mechanisms:
If you are loading Instafeed.js via the standard <script>
tag, Instafeed.js will be available under the global variable Instafeed
:
<script type="text/javascript" src="path/to/instafeed.min.js"></script>
<script type="text/javascript">
var feed = new Instafeed({
//...
});
</script>
requirejs(["path/to/instafeed.min.js"], function (Instafeed) {
var feed = new Instafeed({
//...
});
});
const Instafeed = require("instafeed.js");
var feed = new Instafeed({
//...
});
import Instafeed from "instafeed.js";
var feed = new Instafeed({
//...
});