New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

facebook-api-video-upload

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

facebook-api-video-upload

A handy function to upload video in chunk on the facebook graph.

1.4.1
Version published
Maintainers
1
Created

XO code style

facebook-api-video-upload

Upload a video in chunk on the facebook api. more info

Install

$ npm i facebook-api-video-upload --save

Tested on OS X and Linux.

Usage

const fs = require('fs');
const fbUpload = require('facebook-api-video-upload');

const args = {
	token: yourtoken, // with the permission to upload
	id: yourid, //The id represent {page_id || user_id || event_id || group_id}
	stream: fs.createReadStream('./test/fixture/fixture.mp4'), //path to the video,
	title: "my video",
	description: "my description"
};

fbUpload(args).then((res) => {
	console.log('res: ', res);
	//res:  { success: true, video_id: '1838312909759132' }
}).catch((e) => {
	console.error(e);
});

License

MIT © MrdotB

FAQs

Package last updated on 06 Mar 2019

Did you know?

Socket

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