From 2522a85bbfc0e33ce2b3fb05d8dbac9b3a6dbcc6 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 13 Jun 2023 15:44:35 +0100 Subject: [PATCH] fix(LinkedIn Node): Fix issue with posting as user or organization (#6414) --- .../nodes-base/credentials/LinkedInOAuth2Api.credentials.ts | 2 +- packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts | 2 +- packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/nodes-base/credentials/LinkedInOAuth2Api.credentials.ts b/packages/nodes-base/credentials/LinkedInOAuth2Api.credentials.ts index c87c2999baf15..065115a69822b 100644 --- a/packages/nodes-base/credentials/LinkedInOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/LinkedInOAuth2Api.credentials.ts @@ -42,7 +42,7 @@ export class LinkedInOAuth2Api implements ICredentialType { name: 'scope', type: 'hidden', default: - '=r_liteprofile,r_emailaddress,w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social":""}}', + '=w_member_social{{$self["organizationSupport"] === true ? ",w_organization_social":",r_liteprofile,r_emailaddress"}}', description: 'Standard scopes for posting on behalf of a user or organization. See this resource .', }, diff --git a/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts b/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts index 1c1caf9047b9e..093356a14ba1f 100644 --- a/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts +++ b/packages/nodes-base/nodes/LinkedIn/GenericFunctions.ts @@ -29,7 +29,7 @@ export async function linkedInApiRequest( headers: { Accept: 'application/json', 'X-Restli-Protocol-Version': '2.0.0', - 'LinkedIn-Version': '202301', + 'LinkedIn-Version': '202304', }, method, body, diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index 434fa2cc8c8f9..3b0571cd93a7a 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -107,7 +107,6 @@ export class LinkedIn implements INodeType { lifecycleState: 'PUBLISHED', distribution: { feedDistribution: 'MAIN_FEED', - targetEnties: [], thirdPartyDistributionChannels: [], }, visibility,