Merge pull request #5412 from tomhughes/facebook-sharing

Pass correct URL to Facebook sharing
This commit is contained in:
Andy Allan 2024-12-18 15:05:09 +00:00 committed by GitHub
commit 918370b7a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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