1.0.10 ā€¢ Published 5 years ago

instafeed-lite v1.0.10

Weekly downloads
567
License
MIT
Repository
github
Last release
5 years ago

šŸ–¼ļø Instafeed-Lite

Greenkeeper badge Build Status NPM version

A dead simple way to get data from Instagram (inspired by Instafeed.js)

An Instagram friendly API URL and/or the data it returns. No {{templating}}.

šŸŽļø My suggestion is to use the buildUrl function with your options and fetch however you see fit.

šŸ˜‘ļø If you do not want to do that, then you can use the default in this package (isomorphic-unfetch).

šŸ¤·ļø And if you really don't want to do anything with the code, feel free to use react-instafeed which wraps this for react.

šŸšØļø Instagram is shutting down its current API in 2020. šŸšØļø

Read more here. Instagram Graph API is their new solution, which right now only is enabled for Business Accounts.

Support for Non-Business Profiles FUTURE: Basic permissioning for non-business profiles will be supported in early 2019.

Currently we are still using the v1 endpoints. (No real plan to move to Graph until Non-Business Profiles are ready.)

šŸ‘©ā€šŸ’»ļø Install:

yarn add instafeed-lite

Render

Options:

const options = {
  accessToken: 'access...',
  clientId: 'client...',
  get: 'user', // popular, user
  locationId: null,
  resolution: 'standard_resolution', // thumbnail, low_resolution, standard_resolution
  sortBy: 'none', // none, least-commented, least-liked, least-recent, most-commented, most-liked, most-recent, random
  tagName: null,
  userId: 123,
}

URL:

import { buildUrl } from 'instafeed-lite'

const instagramUrl = buildUrl(options)

Data:

import instafeed from 'instafeed-lite'

const data = instafeed(options)

šŸ““ļø Notes:

Again, just use buildUrl and handle your own loading.

Variables

  • limit - Maximum number of Images to add. (max: 60)
  • resolution - Size of the images to get. Available options are:
    • low_resolution - 320x320
    • standard_resolution - 640x640
    • thumbnail (default) - 150x150
  • sortBy - Sort the images in a set order. Available options are:
    • least-commented - Lowest # of comments to highest.
    • least-liked - Lowest # likes to highest.
    • least-recent - Oldest to newest.
    • most-commented - Highest # of comments to lowest.
    • most-liked - Highest # of likes to lowest.
    • most-recent - Newest to oldest.
    • none (default) - As they come from Instagram.
    • random - Random order.

Further Documentation

šŸ™Œ Props

Super props to the Instafeed, Instagram, and React teams.

ā¤ļø "Legal"

This software is provided as-is, and all that usually lovely stuff.

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.1

6 years ago