Socket
Socket
Sign inDemoInstall

instagram-publisher

Package Overview
Dependencies
72
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    instagram-publisher

Publish Instagram Images, Image Slideshows, Video Reels & Stories via NodeJS


Version published
Weekly downloads
25
increased by127.27%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

NPM Version NPM Downloads Issues

Instagram Publisher

  • Publish Instagram Images, Slideshows, Video Reels & Stories via NodeJS.
  • Supports Geotagging
  • Supports Cookies Caching
  • No API key required

Install

npm install instagram-publisher

Import

import InstagramPublisher from 'instagram-publisher'; // ES module

const InstagramPublisher = require('instagram-publisher'); // commonJS

Authentication 🔒

const client = new InstagramPublisher({
  email: 'youremail@gmail.com',
  password: '12345',
  verbose: true, // default: false
});

Create Image Post 🖼️

const image_data = {
  image_path: './a.jpg',
  caption: 'Image caption',
  location: 'Chicago, United States', // optional
};
const post_published = await client.createSingleImage(image_data);

Create Image Slideshow 🖼️🖼️🖼️

const slideshow_data = {
  images: ['./a.jpg', './b.jpg'],
  caption: 'Slideshow caption',
  location: 'Chicago, United States', // optional
};
const post_published = await client.createImageSlideshow(slideshow_data);

Create Image Story 🎨

const story_data = {
  image_path: './a.jpg',
};
const post_published = await client.createImageStory(story_data);

Create Video Post 📷

const video_data = {
  video_path: './video.mp4',
  thumbnail_path: './thumbnail.jpg',
  caption: 'Video Post caption',
  location: 'Chicago, United States', // optional
};

const post_published = await client.createSingleVideo(video_data);

Create Reel 📷

const reel_data = {
  video_path: './video.mp4',
  thumbnail_path: './thumbnail.jpg',
  caption: 'Reel caption',
  location: 'Chicago, United States', // optional
};

const post_published = await client.createReel(reel_data);

Getting URL's of posts 🔗

All methods return an object with the published post code: { succeeded: true, code: 'CrfNdfjdsfsl' }. You can generate the URL's as follows:

Important Notes ⚠️

  • Maximum images per slideshow: 10
  • Minimum images per slideshow: 2
  • Supported images format: .jpg
  • Supported aspect ratio for slideshow images: 1:1
  • Supported video aspect ratio: 1:1, 9:16, 16:9
  • Supported video formats: .mp4
  • Maximum caption length: 2200 characters
  • URL's are not supported. Use local files only
  • Cookies are cached under cookies.json
  • Videos take some time to be published (< 60 seconds)
  • Enable logging by setting verbose flag to true

Inspiration

License

MIT

Keywords

FAQs

Last updated on 19 Apr 2023

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