Skip to content

mediastream/facebook-api-video-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%