use-instagram-feed

1.0.0 • Public • Published

use-instagram-feed

To install:

  • npm i use-instagram-feed

or

  • yarn add use-instagram-feed

To use, pass the:

import {useInstagramFeed} from use-instagram-feed
 
const App = () => {
  let photos = useInstagramFeed({
    userId: "10972317574",
    thumbnailWidth: 640,
    photoCount: 12,
  })
 
  return (
      <div>
      {photos &&
        photos.map(({ id, caption src, width, height, url }) => (
          <a key={id} href={url}>
            <img src={src} alt={caption} />
          </a>
        ))}
    </div>
  )
}
 
export default App

The hook returns each photo's id, caption text, photo source, photo width & height, and the post's URL

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    62
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    62

Package Sidebar

Install

npm i use-instagram-feed

Weekly Downloads

62

Version

1.0.0

License

MIT

Unpacked Size

3.57 kB

Total Files

4

Last publish

Collaborators

  • wtharris89