2.0.6 ā€¢ Published 4 years ago

hyperlab-gatsby-source-instagram-all v2.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

PLUGIN WILL STOP WORKING ON March 31st, 2020

Instagram deprecates its old API on March 31st, 2020

āš›ļøšŸ“ø Gatsby source plugin to fetch ALL your instagram media from Instagram API + Gatsby Image support.

Demo

Install

  1. yarn add gatsby-source-instagram-all
  2. Add this configuration to your gatsby-config.js:
    {
         resolve: `gatsby-source-instagram-all`,
         options: {
           access_token: "YOUR_ACCESS_TOKEN"
         }
    }
    šŸ‘“ A quick way to get your access token

How to use

Query data like this:

query myQuery {
      allInstagramContent {
        edges {
          node {
           localImage{ 
             childImageSharp {
               fluid(maxHeight: 500, maxWidth: 500 quality: 90) {
                 ...GatsbyImageSharpFluid_withWebp
               }
             }
           }
            images {
              standard_resolution {
                url
              }
            }
          }
        }
      }
   }

You can also get videos, comments, likes, tags etc. Read Instagram API Docs for example response.

Plugin Options

OptionTypeDescription
access_tokenstringYour access token
max_idstring (optional)Option to return media earlier than, but not including, this max_id
min_idstring (optional)Option to return media later than, and including, this min_id