Package Exports
- @dashcambike/instagram-publisher
- @dashcambike/instagram-publisher/dist/index.js
- @dashcambike/instagram-publisher/dist/instagram-publisher.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dashcambike/instagram-publisher) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Instagram Publisher
- Publish Instagram Images, Slideshows, Video Reels & Stories via NodeJS.
- Supports Geotagging
- Supports Cookies Caching
- No API key required
Install
npm install instagram-publisherImport
import InstagramPublisher from 'instagram-publisher'; // ES module
const InstagramPublisher = require('instagram-publisher'); // commonJSAuthentication 🔒
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 created = 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 created = await client.createImageSlideshow(slideshow_data);Create Image Story 🎨
const story_data = {
image_path: './a.jpg',
};
const created = 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 created = 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 created = await client.createReel(reel_data);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:
2200characters - URL's are not supported. Use local files only
- All methods return a
booleanvalue - Cookies are cached under
cookies.json - Videos take some time to be published (< 60 seconds)
- Enable logging by setting
verboseflag to true
Inspiration
License
MIT