I'm trying to post a video using Facebook Graph API from my Nodejs server with the npm package Facebook-node-sdk
Posting regular posts with message or images work fine for me, but no videos
here is my code :
var FB = require('fb');
var request = require('request');
FB.setAccessToken('MY_APP_ACCESS_TOKEN');
var params = {};
params['source'] = "@video.3gp";
params['title'] = "test video";
params['video_file_chunk'] = "@video.3gp";
FB.api('me/videos', 'post', params , function (res) {
if(!res || res.error) {
console.log(!res ? 'error occurred' : res.error);
return;
}
console.log('Post Id: ' + res.id);
});
the video is in the same folder as my js running file.
I'm getting error code
type: 'FacebookApiException',
code: 390,
error_subcode: 1363030,