diff --git a/packages/nodes-base/credentials/FacebookGraphSubscriptionApi.credentials.ts b/packages/nodes-base/credentials/FacebookGraphAppApi.credentials.ts similarity index 67% rename from packages/nodes-base/credentials/FacebookGraphSubscriptionApi.credentials.ts rename to packages/nodes-base/credentials/FacebookGraphAppApi.credentials.ts index b96f841347..e7d3c4e27b 100644 --- a/packages/nodes-base/credentials/FacebookGraphSubscriptionApi.credentials.ts +++ b/packages/nodes-base/credentials/FacebookGraphAppApi.credentials.ts @@ -3,15 +3,15 @@ import { NodePropertyTypes, } from 'n8n-workflow'; -export class FacebookGraphSubscriptionApi implements ICredentialType { - name = 'facebookGraphSubscriptionApi'; - displayName = 'Facebook Graph API'; +export class FacebookGraphAppApi implements ICredentialType { + name = 'facebookGraphAppApi'; + displayName = 'Facebook Graph API (App)'; extends = [ 'facebookGraphApi', ]; properties = [ { - displayName: 'APP Secret', + displayName: 'App Secret', name: 'appSecret', type: 'string' as NodePropertyTypes, default: '', diff --git a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts index cb0f16b7af..278ca729bc 100644 --- a/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts +++ b/packages/nodes-base/nodes/Facebook/FacebookTrigger.node.ts @@ -41,7 +41,7 @@ export class FacebookTrigger implements INodeType { outputs: ['main'], credentials: [ { - name: 'facebookGraphSubscriptionApi', + name: 'facebookGraphAppApi', required: true, }, ], @@ -216,7 +216,7 @@ export class FacebookTrigger implements INodeType { const res = this.getResponseObject(); const req = this.getRequestObject(); const headerData = this.getHeaderData() as IDataObject; - const credentials = this.getCredentials('facebookGraphSubscriptionApi') as IDataObject; + const credentials = this.getCredentials('facebookGraphAppApi') as IDataObject; // Check if we're getting facebook's challenge request (https://developers.facebook.com/docs/graph-api/webhooks/getting-started) if (this.getWebhookName() === 'setup') { if (query['hub.challenge']) { diff --git a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts index 45412ff8f0..20e16ecf49 100644 --- a/packages/nodes-base/nodes/Facebook/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Facebook/GenericFunctions.ts @@ -19,7 +19,7 @@ export async function facebookApiRequest(this: IHookFunctions | IExecuteFunction let credentials; if (this.getNode().name.includes('Trigger')) { - credentials = this.getCredentials('facebookGraphSubscriptionApi') as IDataObject; + credentials = this.getCredentials('facebookGraphAppApi') as IDataObject; } else { credentials = this.getCredentials('facebookGraphApi') as IDataObject; } diff --git a/packages/nodes-base/package.json b/packages/nodes-base/package.json index 90973cc2ae..ca4b4ea066 100644 --- a/packages/nodes-base/package.json +++ b/packages/nodes-base/package.json @@ -66,7 +66,7 @@ "dist/credentials/EventbriteApi.credentials.js", "dist/credentials/EventbriteOAuth2Api.credentials.js", "dist/credentials/FacebookGraphApi.credentials.js", - "dist/credentials/FacebookGraphSubscriptionApi.credentials.js", + "dist/credentials/FacebookGraphAppApi.credentials.js", "dist/credentials/FreshdeskApi.credentials.js", "dist/credentials/FileMaker.credentials.js", "dist/credentials/FlowApi.credentials.js",