Skip to content

Simple JavaScript file to load Instagram pictures of a certain tag and infinite scroll through them

Notifications You must be signed in to change notification settings

ryancw/instagram-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

instagram-scroll

Simple JavaScript file to load Instagram pictures of a certain tag or user and infinite scroll through them.

Use

Link to the instagram-scroll.js source file in your webpage. JQuery is required.

<script>
InstagramScroll({tag: "cats", clientID: "token", imageContainer: "#pics"})
</script>

This will add a ul to any object on the page with an ID of 'pics' filled with 20 of the most recent Instagram images tagged with 'cats'.

Parameters

The three necessary parameters for using the function are:

  • tag/user - search term or user name for the images
  • clientID - given through the Instagram Developer API
  • imageContainer - the DOM element where the ul containing the images will be inserted

Optional parameters include:

  • includeCaption - add the caption in text after the picture. Default is false.
  • includeUsername - add the username in text after the picture. Default is false.
  • scrollDistance - distance in pixels from bottom of page scroll bar needs to be for new images to be loaded. Default is 350.
  • imageSize - size in pixels of the loaded. Default is 200.
  • imageQuality - size of image loaded, can either be 'thumbnail', 'low_resolution', or 'standard_resolution'. Default is standard_resolution.

Demo

A sample of the script in action can be seen [here](http://www.ryancw.com/scroll-test.html).

About

Simple JavaScript file to load Instagram pictures of a certain tag and infinite scroll through them

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published