mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 13:39:44 -08:00
1c229a7b52
* ⬆️ Upgrade linter * 📦 Update `package-lock.json` * 👕 Enable rule * 👕 Apply rule * 📦 Re-update `package-lock.json`
36 lines
723 B
TypeScript
36 lines
723 B
TypeScript
import {
|
|
IAuthenticateGeneric,
|
|
ICredentialTestRequest,
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class FacebookGraphApi implements ICredentialType {
|
|
name = 'facebookGraphApi';
|
|
displayName = 'Facebook Graph API';
|
|
documentationUrl = 'facebookGraph';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Access Token',
|
|
name: 'accessToken',
|
|
type: 'string',
|
|
typeOptions: { password: true },
|
|
default: '',
|
|
},
|
|
];
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
qs: {
|
|
access_token: '={{$credentials.accessToken}}',
|
|
},
|
|
},
|
|
};
|
|
test: ICredentialTestRequest = {
|
|
request: {
|
|
baseURL: 'https://graph.facebook.com/v8.0',
|
|
url: '/me',
|
|
},
|
|
};
|
|
}
|