From be4ac3be24a6b026687350473cba00d7a528e384 Mon Sep 17 00:00:00 2001 From: Daniel Bruness Date: Tue, 4 Aug 2020 20:55:20 +0200 Subject: [PATCH] Added graph-video option --- src/fb.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fb.js b/src/fb.js index 204342e..a8771fd 100644 --- a/src/fb.js +++ b/src/fb.js @@ -26,6 +26,7 @@ var {version} = require('../package.json'), appSecret: null, appSecretProof: null, beta: false, + graphVideo: false, version: 'v2.5', timeout: null, scope: null, @@ -358,7 +359,7 @@ class Facebook { if ( !/^v\d+\.\d+\//.test(path) ) { path = this.options('version') + '/' + path; } - uri = `https://graph.${this.options('beta') ? 'beta.' : ''}facebook.com/${path}`; + uri = `https://graph${this.options('graphVideo') ? '-video' : ''}.${this.options('beta') ? 'beta.' : ''}facebook.com/${path}`; parsedUri = URL.parse(uri); delete parsedUri.search;