Skip to content

https://www.npmjs.com/package/instagram-fetcher Fetch Instagram Business and Creator account feeds with this Node.js package. This package uses the Instagram Graph API to fetch all posts from an authorized Instagram Business or Creator account, including non-public posts.

prasoonthakur8/instagram-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Business Fetcher

Fetch Instagram Business and Creator account feeds with this Node.js package. This package uses the Instagram Graph API to fetch all posts from an authorized Instagram Business or Creator account, including non-public posts.

Installation

To install the package, use the following command:

npm install instagram-business-fetcher

Usage

To use the package, you will need to obtain an access token from the Instagram Graph API. You can do this by following the official documentation.

Once you have an access token, you can use the package in your Node.js application by importing the InstagramFetcher class and initializing it with your access token:

const InstagramFetcher = require('instagram-business-fetcher');
const fetcher = new InstagramFetcher('your_access_token_here');

fetcher.fetch()
  .then((media) => {
    console.log(media);
  })
  .catch((error) => {
    console.error(`Error: ${error.message}`);
  });

The fetch method will return an array of media objects, which include information about the post such as its ID, type, URL, caption, and timestamp.

Configuration

The package uses the dotenv module to load configuration from a .env file. You should create a .env file in the root directory of your project and add the following line:

ACCESS_TOKEN=your_access_token_here

Replace your_access_token_here with your actual Instagram Business or Creator account access token.

License

This package is licensed under the MIT License.

About

https://www.npmjs.com/package/instagram-fetcher Fetch Instagram Business and Creator account feeds with this Node.js package. This package uses the Instagram Graph API to fetch all posts from an authorized Instagram Business or Creator account, including non-public posts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published