我创建了一个用于测试的页面,我正在尝试将视频上传到此页面(页面未发布),但我每次都遇到相同的错误。
错误:(#100) 没有发布视频的权限
我使用 user_videos、publish_video、manage_pages、pages_show_list、publish_pages、publish_to_groups、public_profile 权限在 Graph API Explorer 上创建了用户令牌。
有人知道这个问题解决了吗?
我的代码是;
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);
});