def facebook_share_url(opts = {})
      page_url = opts.fetch(:url, request.original_url)

      page_url = CGI.escape(page_url)
      share_url = "https://facebook.com/sharer/sharer.php?u=#{page_url}"

      share_url
    end
def facebook_share_url(opts = {})
      page_url = opts.fetch(:url, request.original_url)

      page_url = CGI.escape(page_url)
      share_url = "https://facebook.com/sharer/sharer.php?u=#{page_url}"

      share_url
    end
Facebook social sharing
 URL snippet built from - https://sharingbuttons.io/

 @param [Hash] opts the options to create the share URL
 @option opts [String] :url Supply URL if would like to share URL other than the current

 @return [String] Facebook URL to share a page