From a73f9a2a3b8423fbf1641428860ce884925846c5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 18 Dec 2024 14:50:49 +0000 Subject: [PATCH] Pass correct URL to Facebook sharing --- lib/social_share_button_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/social_share_button_helper.rb b/lib/social_share_button_helper.rb index fe47c6ca15..2e822ecb87 100644 --- a/lib/social_share_button_helper.rb +++ b/lib/social_share_button_helper.rb @@ -39,7 +39,7 @@ def self.generate_share_url(site, params) when :linkedin "https://www.linkedin.com/sharing/share-offsite/?url=#{URI.encode_www_form_component(params[:url])}" when :facebook - "https://www.facebook.com/sharer/sharer.php?u=#{URI.encode_www_form_component('params[:url]')}&t=#{URI.encode_www_form_component(params[:title])}" + "https://www.facebook.com/sharer/sharer.php?u=#{URI.encode_www_form_component(params[:url])}&t=#{URI.encode_www_form_component(params[:title])}" when :mastodon "https://mastodonshare.com/?text=#{URI.encode_www_form_component(params[:title])}&url=#{URI.encode_www_form_component(params[:url])}" when :telegram