diff --git a/src/v0/destinations/facebook_pixel/transform.js b/src/v0/destinations/facebook_pixel/transform.js index 1bc97ac1fb..6729ea2021 100644 --- a/src/v0/destinations/facebook_pixel/transform.js +++ b/src/v0/destinations/facebook_pixel/transform.js @@ -65,7 +65,7 @@ const responseBuilderSimple = (message, category, destination) => { } = Config; const integrationsObj = getIntegrationsObj(message, 'fb_pixel'); - const endpoint = `https://graph.facebook.com/v17.0/${pixelId}/events?access_token=${accessToken}`; + const endpoint = `https://graph.facebook.com/v18.0/${pixelId}/events?access_token=${accessToken}`; const userData = fetchUserData( message, diff --git a/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts b/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts index d560658341..4cac831203 100644 --- a/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts +++ b/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts @@ -25,7 +25,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_access_token', + 'https://graph.facebook.com/v18.0/1234567891234567/events?access_token=invalid_access_token', params: { destination: 'facebook_pixel', }, @@ -90,7 +90,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=my_access_token', + 'https://graph.facebook.com/v18.0/1234567891234567/events?access_token=my_access_token', params: { destination: 'facebook_pixel', }, @@ -140,7 +140,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_timestamp_correct_access_token', + 'https://graph.facebook.com/v18.0/1234567891234567/events?access_token=invalid_timestamp_correct_access_token', params: { destination: 'facebook_pixel', }, @@ -210,7 +210,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=throttled_valid_access_token', + 'https://graph.facebook.com/v18.0/1234567891234567/events?access_token=throttled_valid_access_token', params: { destination: 'facebook_pixel', }, @@ -275,7 +275,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_account_id_valid_access_token', + 'https://graph.facebook.com/v18.0/1234567891234567/events?access_token=invalid_account_id_valid_access_token', params: { destination: 'facebook_pixel', }, @@ -343,7 +343,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=not_found_access_token', + 'https://graph.facebook.com/v18.0/1234567891234567/events?access_token=not_found_access_token', params: { destination: 'facebook_pixel', }, @@ -412,7 +412,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234570/events?access_token=valid_access_token', + 'https://graph.facebook.com/v18.0/1234567891234570/events?access_token=valid_access_token', }, method: 'POST', }, @@ -478,7 +478,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234571/events?access_token=valid_access_token', + 'https://graph.facebook.com/v18.0/1234567891234571/events?access_token=valid_access_token', }, method: 'POST', }, @@ -544,7 +544,7 @@ export const data = [ headers: {}, version: '1', endpoint: - 'https://graph.facebook.com/v17.0/1234567891234572/events?access_token=valid_access_token_unhandled_response', + 'https://graph.facebook.com/v18.0/1234567891234572/events?access_token=valid_access_token_unhandled_response', }, method: 'POST', }, diff --git a/test/integrations/destinations/facebook_pixel/processor/data.ts b/test/integrations/destinations/facebook_pixel/processor/data.ts index d5d0a8ec96..7b0d9c78b8 100644 --- a/test/integrations/destinations/facebook_pixel/processor/data.ts +++ b/test/integrations/destinations/facebook_pixel/processor/data.ts @@ -106,7 +106,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -445,7 +445,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -569,7 +569,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -688,7 +688,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -807,7 +807,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -927,7 +927,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1047,7 +1047,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1166,7 +1166,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1284,7 +1284,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1419,7 +1419,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1554,7 +1554,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1705,7 +1705,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1855,7 +1855,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -1984,7 +1984,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2106,7 +2106,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2249,7 +2249,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2392,7 +2392,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2516,7 +2516,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2640,7 +2640,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2768,7 +2768,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -2893,7 +2893,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -3014,7 +3014,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -3133,7 +3133,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -3282,7 +3282,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -3510,7 +3510,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -3631,7 +3631,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -3884,7 +3884,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -4027,7 +4027,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -4289,7 +4289,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -4752,7 +4752,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -4897,7 +4897,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -5178,7 +5178,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -5310,7 +5310,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -5440,7 +5440,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -6033,7 +6033,7 @@ export const data = [ type: 'REST', method: 'POST', endpoint: - 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=dummyAccessToken', + 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=dummyAccessToken', headers: {}, params: {}, body: { diff --git a/test/integrations/destinations/facebook_pixel/router/data.ts b/test/integrations/destinations/facebook_pixel/router/data.ts index ef6b9f8635..1ee8b9c860 100644 --- a/test/integrations/destinations/facebook_pixel/router/data.ts +++ b/test/integrations/destinations/facebook_pixel/router/data.ts @@ -193,7 +193,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: { @@ -254,7 +254,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', headers: {}, params: {}, body: {