From 2f79e228de946d8957df6e9f844de29a6b887193 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 3 Mar 2021 17:28:23 +0100 Subject: [PATCH] Add Facebook Post --- tarteaucitron.services.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 92adb8f..86776b8 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -88,6 +88,36 @@ tarteaucitron.services.podcloud = { } }; +// facebookpost +tarteaucitron.services.facebookpost = { + "key": "facebookpost", + "type": "social", + "name": "Facebook Post", + "uri": "https://www.facebook.com/help/325807937506242", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + tarteaucitron.fallback(['tac_facebookpost'], function (x) { + var width = x.getAttribute("width"), + height = x.getAttribute("height"), + url = x.getAttribute("data-url"), + appId = x.getAttribute("data-appid"); + + return ''; + }); + }, + "fallback": function () { + "use strict"; + var id = 'facebookpost'; + tarteaucitron.fallback(['tac_facebookpost'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; + // amplitude tarteaucitron.services.amplitude = { "key": "amplitude",