]> git.openstreetmap.org Git - rails.git/commitdiff
Merge pull request #5412 from tomhughes/facebook-sharing
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 18 Dec 2024 15:05:09 +0000 (15:05 +0000)
committerGitHub <noreply@github.com>
Wed, 18 Dec 2024 15:05:09 +0000 (15:05 +0000)
Pass correct URL to Facebook sharing

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
-      "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