I want to set up a way for my server to grab all of my instagram photos and put them on a website. I'm trying to use this lib https://github.com/mckelvey/instagram-node-lib.
It says I need to auth as the user (myself) to get the photo feed. Can I do this in an automated way from the server? I don't want visitors to my site to have to login...
I just can't figure out how to get my own feed for an anonymous user on my site. I don't want to deal with redirects and urls, I just want to get my own feed server-side.
Thanks!
How to setup instagram-node-lib (for a personal site)
http://instagram.com/developer/ - Fill out the info, both the URLs can just be yourdomain.com
You should get a Client ID / Client Secret!
You’ll also need your user id (which is not your username) and an access_token (basically the idea is that you have to prove you are a particular person in case the user you are trying to get photos for is viewable).
Now, since I’m guessing you get all fuzzy when people start talking about OAuth stuff (me too) here’s a lame way to grab a access_token:
Just search the page for a “click here” link, you’ll walk through the OAuth process for this tiny bit of JS and the page will come back with your access_token.
Now, for a small bit of code to prove what we did just worked:
Instagram = require('instagram-node-lib');
Instagram.set('client_id', '*******');
Instagram.set('client_secret', '*******');
Instagram.set('access_token', '*******');
console.log(Instagram.users.recent({ user_id: ******* })); // Notice the distinct lack of quotes around the user_Id
HIGHFIVE!