-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
facebook.js
37 lines (30 loc) · 1.03 KB
/
facebook.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.AuthorizationCode = exports.version = void 0;
var _simpleOauth = require("simple-oauth2");
/**
* @copyright 2021-present Kriasoft (https://git.io/JOevo)
*/
const version = "v10.0";
exports.version = version;
class AuthorizationCode extends _simpleOauth.AuthorizationCode {
constructor(options = {}) {
var _options$id, _options$secret;
super({
client: {
id: (_options$id = options.id) !== null && _options$id !== void 0 ? _options$id : process.env.FACEBOOK_APP_ID,
secret: (_options$secret = options.secret) !== null && _options$secret !== void 0 ? _options$secret : process.env.FACEBOOK_APP_SECRET
},
auth: {
tokenHost: "https://graph.facebook.com",
tokenPath: `/${version}/oauth/access_token`,
authorizeHost: "https://www.facebook.com",
authorizePath: `/${version}/dialog/oauth`
},
options: options.options
});
}
}
exports.AuthorizationCode = AuthorizationCode;