From: Tom Hughes Date: Wed, 18 Dec 2024 14:50:49 +0000 (+0000) Subject: Pass correct URL to Facebook sharing X-Git-Tag: live~341^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a73f9a2a3b8423fbf1641428860ce884925846c5?ds=inline;hp=-c Pass correct URL to Facebook sharing --- a73f9a2a3b8423fbf1641428860ce884925846c5 diff --git a/lib/social_share_button_helper.rb b/lib/social_share_button_helper.rb index fe47c6ca1..2e822ecb8 100644 --- a/lib/social_share_button_helper.rb +++ b/lib/social_share_button_helper.rb @@ -39,7 +39,7 @@ module SocialShareButtonHelper 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