I'm created a page for testing and I'm trying upload video to this page (page is unpublished) but I'm getting same error every time.
Error: (#100) No permission to publish the video
I created user token on Graph API Explorer with user_videos, publish_video, manage_pages, pages_show_list, publish_pages, publish_to_groups, public_profile permissions.
Anybody know this problem solve?
My code is;
const fs = require('fs');
const fbUpload = require('facebook-api-video-upload');
const args = {
token: "[TOKEN]", // with the permission to upload
id: "[PAGE_ID]", //The id represent {page_id || user_id || event_id || group_id}
stream: fs.createReadStream('./content/lake.mp4'), //path to the video,
title: "video title 1",
description: "video description 1",
thumb: {
value: fs.createReadStream('./content/lake.mp4'),
options: {
filename: 'lake.jpg',
contentType: 'image/jpg'
}
}
};
fbUpload(args).then((res) => {
console.log('res: ', res);
}).catch((e) => {
console.error(e.message);
});