Add og:url to OpenGraph tags
authorTom Hughes <tom@compton.nu>
Tue, 27 Oct 2015 11:52:40 +0000 (11:52 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 27 Oct 2015 12:01:58 +0000 (12:01 +0000)
app/helpers/open_graph_helper.rb

index 61c3dc4..cb72d72 100644 (file)
@@ -5,7 +5,8 @@ module OpenGraphHelper
       "og:title" => [t("layouts.project_name.title"), title].compact.join(" | "),
       "og:type" => "website",
       "og:image" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "http"),
-      "og:image:secure_url" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "https")
+      "og:image:secure_url" => image_path("osm_logo_256.png", :host => SERVER_URL, :protocol => "https"),
+      "og:url" => url_for(:host => SERVER_URL)
     }
 
     tags.map do |property, content|