

These are set explicitly in this example, however, in my usual build process I have been using: ( ):ĪccessToken='accessTokenInstagramApiString' If there is a more secure way of doing this, please submit an Issue / Pull Request / etc.
#REACT REQUIRE INSTAFEED CODE#
`instafeed.js` is client facing library, so your API Keys and the like kind of need to be in the code to work. In `template` do not use className (React), HTML standards apply.Īs well as a breakdown of some advanced functionality in this issue: `template` - Custom HTML template to use for images. `target` - The ID of a DOM element you want to add the images to. `least-commented` - Lowest # of comments to highest. `most-commented` - Highest # of comments to lowest. `least-liked` - Lowest # likes to highest.

`most-liked` - Highest # of likes to lowest. `none` (default) - As they come from Instagram.

`sortBy` - Sort the images in a set order. `resolution` - Size of the images to get. `limit` - Maximum number of Images to add. No jQuery required, just plain 'ol javascript. > Instafeed.js is a dead-simple way to add Instagram photos to your website. This post was sponsored by Serosensa Creative - the creative agency I work at - who allowed me to spend some time writing this up for all you lovely readers out there.( ) implementation of ( ) Var feed = new Instafeed() These are the closing tags from var feed new instanceĪnd there you have it - that’s everything you need to do to get a live instagram feed on your site! You can read more about doing this in the readme that can be found here Anyway, so here’s how we implemented a feed:

If this doesn’t make sense, here is an example: My instagram account can be located at Therefore, my account name is sunilsandhu Plop this into the smashballoon link and it’ll give you your user id - it’s quite long but make sure you copy the whole damn thing, as you’ll need it in a bit. To get this, simply visit and type in your instagram account name. It’s the magical JS code that you’ll have to play with (a little) to get the thing to work. This is a case of simply adding the instafeed.js file from this github link: There’s no need to tamper with it, it simply works. Let’s go through each bit and explain what you need to do. The following bits are needed to make the Instagram API work:Ĥ - magical JS code to activate the feed (more on this later) Don’t worry, you can make the feed look way better than this!
