Socket
Socket
Sign inDemoInstall

gatsby-source-instagram-all

Package Overview
Dependencies
3
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-source-instagram-all

Gatsby source plugin for fetching all your instagram media


Version published
Weekly downloads
1.3K
increased by3.55%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

⚛️📸 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",
     }
}

👓 Watch this video if you're having trouble generating your access token.

How to use

Query data like this:

query myQuery {
  allInstagramContent {
    edges {
      node {
        caption
        media_url
        localFile {
          childImageSharp {
            gatsbyImageData(layout: CONSTRAINED, placeholder: BLURRED)
          }
        }
        album {
          localFile {
            childImageSharp {
              gatsbyImageData(layout: CONSTRAINED, placeholder: BLURRED)
            }
          }
        }
      }
    }
  }
}

Graphql fields

Field NameDescription
captionThe Media's caption text
localFileThe local image.
idThe Media's ID.
media_typeThe Media's type. Can be IMAGE, VIDEO, or CAROUSEL_ALBUM.
media_urlThe Media's URL.
permalinkThe Media's permanent URL. Will be omitted if the Media contains copyrighted material, or has been flagged for a copyright violation.
thumbnail_urlThe Media's thumbnail image URL. Only available on VIDEO Media.
timestampThe Media's publish date in ISO 8601 format.
usernameThe Media owner's username.
albumThe CAROUSEL_ALBUM media. Has the same fields as the root media node

Plugin Options

OptionTypeDescription
access_tokenstringYour access token
limitnumber (optional)Limit number of posts. Default is infinity
pageLimitnumber (optional)Limit number of posts fetched per request. Default is 30

Contribute

  1. Fork it
  2. Create your feature branch git checkout -b feature/fooBar
  3. Commit your changes git commit -am 'Add some fooBar'
  4. Push to the branch git push origin feature/fooBar
  5. Create a new Pull Request

Keywords

FAQs

Last updated on 18 Dec 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc