]> git.openstreetmap.org Git - rails.git/commitdiff
Pass correct URL to Facebook sharing
authorTom Hughes <tom@compton.nu>
Wed, 18 Dec 2024 14:50:49 +0000 (14:50 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 18 Dec 2024 14:50:49 +0000 (14:50 +0000)
lib/social_share_button_helper.rb

index fe47c6ca15d435d8718ad5d08eb3dcbf973280c9..2e822ecb872002c51a7a8d66ae43ae61efb3bdb6 100644 (file)
@@ -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
     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
     when :mastodon
       "https://mastodonshare.com/?text=#{URI.encode_www_form_component(params[:title])}&url=#{URI.encode_www_form_component(params[:url])}"
     when :telegram