instagram-feed-header-image
Saturday, March 29th 2014
Dreamweaver
6 comments

Instagram Feed Onto Your Website – Dreamweaver


Instagram Images/Feed Onto Your Website Instagram has been on the rapid rise over the past couple years and in an incredibly useful tool to capture and share photos from events, occasions, and just everyday stuff, but you can also target specific hashtags to display images tagged with such on your website. For instance I was working on a project called “Philly Is Ugly” and I tagged all of my images of behind the scenes with #phillyisugly and targeted that tag to display on the Philly is Ugly website. Let’s take a look at how I did that using Dreamweaver.

This tutorial is proudly sponsored by our generous sponsor, Squarespace, the fast and easy way to create a professional website.

Instagram Feed Into Your Website Dreamweaver Tutorial

Video

1. Get The Plugin (Instafeed.js)

Instafeed.js is a crazy simple way to grab an Instagram feed and pop it into your website. You can download the Instafeed.js file for free here at this link and save the .js file where you can find it later.

Instagram Feed Into Your Website Dreamweaver Tutorial

 

2. Create Client ID via Instagram

You’ll want to log into your Instagram account and go to this link  http://instagram.com/developer/clients/manage/ to find the page where you will be able to register a new client. We will want to create a new “client” for this feed project. NOTE: Before being able to create a new client, you may need to confirm your phone number on Instagram.

Instagram Feed Into Your Website Dreamweaver Tutorial

Instagram Feed Into Your Website Dreamweaver Tutorial

Instagram Feed Into Your Website Dreamweaver Tutorial

3. Name Client ID via Instagram

Give your Client ID an Application Name, a Description, as well as Website and Redirect URI, fill out the CAPTCHA and hit the “Register” button to create that new Client ID. We’re not going to go over exactly what the authentication process via oAuth and the rediect_uri is here in this tutorial, but if you have questions Instagram has some information you can check out as well as running a couple Google searches.

Instagram Feed Into Your Website Dreamweaver Tutorial

Instagram Feed Into Your Website Dreamweaver Tutorial

4. Writing some HTML

The Instafeed.js script looks for a div with the id “instafeed”. We’re going to add that a div to our code and give it that id. See my screenshot to see the code I placed and to see where I placed it.

<div id="instafeed"></div>

Instagram Feed Into Your Website Dreamweaver Tutorial

5. Link to the JavaScript File

Jump up to the header portion of your HTML document and add this one line of code to link to wherever you have saved your Instafeed.js file.

<script type="mce-text/javascript" src="style/scripts/instafeed.min.js"></script>

Instagram Feed Into Your Website Dreamweaver Tutorial

6. Start Adding JavaScript

I’m going to start by creating another open and closing script tag here below my call to grab the JavaScript file.

<script type="mce-text/javascript">// <![CDATA[


// ]]></script>

Instagram Feed Into Your Website Dreamweaver Tutorial

7. Create a New Variable

We’re going place this code within our script tag that we just created. We want to create a new variable which will contain the parameters of our Instagram feed which is displayed on our website (The tag which we’re targeting, the size or resolution of the images, ordering, number of images, and a bunch more. We have options here.) You can check out the code below.

var feed = new Instafeed ({

});

Instagram Feed Into Your Website Dreamweaver Tutorial

8. Choose Our Tag

Now we’ll specify that we want to grab images that are tagged with a specific tag and then choose which tag we want to target. Here I am targeting a tag I created in Summer of 2013 for a film project entitled “Philly Is Ugly” that I was working on at the time. We’ll be targeting ‘phillyisugly’ (#phillyisugly).

var feed = new Instafeed ({
get: 'tagged',
tagName: 'phillyisugly',
});

Instagram Feed Into Your Website Dreamweaver Tutorial

9. Add the Client ID to Make It Work

To make this feed work, simply paste in your Client ID to ensure proper authentication and we have to add a little line of code outside of our variable to tell this function to RUN! Check out the code below to see exactly what I wrote. Test your file in your browser and you will see a populated bunch of images from Instagram.

var feed = new Instafeed ({
get: 'tagged',
tagName: 'phillyisugly',
clientId: '78a4558a72544a10a4c625e21fe755bb'
});
feed.run();

Instagram Feed Into Your Website Dreamweaver Tutorial

Instagram Feed Into Your Website Dreamweaver Tutorial

10. Making Changes to Feed

With a few simple adjustments you can quickly change the images that are fed into your site. Obviously you can simply change the tag that is loaded, but you also can grab the latest popular images on Instagram at that moment by adjusting the code as I have.

var feed = new Instafeed ({
get: 'popular',
clientId: '78a4558a72544a10a4c625e21fe755bb'
});
feed.run();

Instagram Feed Into Your Website Dreamweaver Tutorial

11. Limit Images and Linking

I’m going to go back to loading my “phillyIsUgly” tag and we’re going to take a look at loading more than just our initial 16 images. We want to load 32 images and also let’s look at removing the link to the Instagram image. NOTE: You can load up to 60 images at one time via Instagram.

var feed = new Instafeed ({
get: 'tagged',
tagName: 'phillyisugly',
limit: '32',
links: 'false',
clientId: '78a4558a72544a10a4c625e21fe755bb'
});
feed.run();

Instagram Feed Into Your Website Dreamweaver Tutorial

Instagram Feed Into Your Website Dreamweaver Tutorial

Instagram Feed Into Your Website Dreamweaver Tutorial

12. CSS Finishing Touches

Using a little CSS, I am able to add some spacing between my images here as well as a simple opacity shift when the user hovers over any image. NOTE: You may want to have the link to the Instagram image if you’re creating some kind of interaction when the user rolls over one of the images.

#instafeed img {
padding:5px;
opacity:0.8;
filter:alpha(opacity=80);
}

#instafeed img:hover {
opacity:1;
filter:alpha(opacity=100);
}

Instagram Feed Into Your Website Dreamweaver Tutorial

 

13. That’s It!

There you have it, a simple way to pipe an Instagram feed into your website. Be sure to explore all the features on the Instafeed.js page and really check out the power they’ve packed into this quick and easy script. Thanks, Instafeed team!

Instagram Feed Into Your Website Dreamweaver Tutorial

  • http://www.websitecandi.com/webdeveloper/index.html Website Candi Inc.

    Quick question: How do we get the “instafeed” to scroll like this? http://vinthomas.com Any thoughts?

  • Jayson Pimentel

    how about merge it to gridrotator.js how can we do that? http://tympanus.net/codrops/2012/08/02/animated-responsive-image-grid/

  • David Marc Ashton

    I have broken links? do you know why please?

  • Chandan

    I too have broken images, is it working for anybody?

  • tomo

    I done it step by step but it doesn’t work for me. where could i have miss?

    thx

  • Angel

    Does this require the web page viewer to grant authorization to your app to get access token for the content to be fetched?

    Meaning no authorization = no content?

    If yes, are there any other way to fetch information that are set to be public without access tokens like in facebook where some API’s doesn’t need access token?