From bec2767531222cd421fe54c78915e1d8ab794912 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 29 Nov 2023 17:50:21 +0100 Subject: [PATCH] fixing twitter integration --- template-components/post-infos-capsule.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template-components/post-infos-capsule.php b/template-components/post-infos-capsule.php index a233bb7..e109912 100644 --- a/template-components/post-infos-capsule.php +++ b/template-components/post-infos-capsule.php @@ -9,7 +9,7 @@ if (!function_exists('build_share_urls')) { $postUrl = get_permalink($postID); $postTitle = get_the_title($postID); $facebookUrl = 'https://www.facebook.com/sharer.php?u=' . $postUrl; - $twitterUrl = 'https://www.facebook.com/sharer.php?u=' . $postUrl; + $twitterUrl = 'https://twitter.com/intent/tweet?text=' . $postTitle . '&url=' . get_the_permalink(get_the_id()); $linkedInUrl = 'https://www.linkedin.com/feed/?shareActive=true&text=' . $postTitle . ' ' . $postUrl; return array( @@ -30,6 +30,7 @@ $shareUrls = build_share_urls($postID); + $shareUrl) : ?> ">