ryancw / instagram-scroll

Simple JavaScript file to load Instagram pictures of a certain tag and infinite scroll through them
14 stars 6 forks source link

Nice implementation #5

Open mcmanimie opened 9 years ago

mcmanimie commented 9 years ago

Just wanted to give you a shout out as I was looking for a infinite IG feed in a pinch and yours was the perfect solution.

As thanks I figured I'd let you know that you misspelled InstagramScroll in the USE box (see below) and in a fit of boredom/need after seeking the client ID for a bunch of client sites with IG feeds I created this. Might help your users: http://findmyinstagramid.com/

<script>
InstgramScroll({tag: "cats", clientID: "token", imageContainer: "#pics"})
</script>
ryancw commented 9 years ago

Thanks for letting me know about the typo! Glad you found the script useful.

Is there any way I could make this script easier to use? Did you need to modify anything to get it to work? I'm looking to make it really simple for anyone to drop into a webpage and use.

Also, are there any more features that would be helpful? I am looking for more things to add.

mcmanimie commented 9 years ago

Sure, I added a few things. I'd throw the code back to you but nothing was particularly difficult, a lot was specific to my implementation, and most of it is hard coded anyway (for the time being anyway). It's a build out for a client so one it goes live I'll post a link. I'll also be throwing up a blog post on their site that credits all the developers behind the various components I've used so I'll be sure to list you.

Let's see...

The biggest would be templating so the user could have more control of the output, exposing more fields in the process (likes, comment count, time_created etc..). Check out instafeed.js.

After that, it's just a bunch of little stuff. Finding the ID via user name is great, but if you have it, it's a wasted call. My implementation is going to throw a lot of action at the IG API and very well could rub up against the limit so I needed to circumvent that and pass the ID in directly.

Hmm, what else. I added some regex to automatically create links if user names were found in the comments.

Might want to default to target=_blank for any external links, templating would obviously solve this.