From bec7b96de7f139a43ecff1be1efc1e0aa0c20741 Mon Sep 17 00:00:00 2001 From: danielgrippi <danielgrippi@gmail.com> Date: Wed, 2 May 2012 22:50:57 -0700 Subject: [PATCH] add more og markup; send over large image re FB's request --- app/helpers/open_graph_helper.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/helpers/open_graph_helper.rb b/app/helpers/open_graph_helper.rb index b4ee747f1d..a01ae138c4 100644 --- a/app/helpers/open_graph_helper.rb +++ b/app/helpers/open_graph_helper.rb @@ -12,8 +12,8 @@ module OpenGraphHelper end def og_image(post) - tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_small))} - tags << meta_tag_with_property('og:image', "#{root_url.chop}#{image_path('asterisk.png')}") if tags.empty? + tags = post.photos.map{|x| meta_tag_with_property('og:image', x.url(:thumb_large))} + tags << meta_tag_with_property('og:image', "#{root_url.chop}#{image_path('asterisk.png')}") if tags.empty? tags.join(' ') end @@ -25,8 +25,13 @@ module OpenGraphHelper meta_tag_with_property('og:description', post_page_title(post, :length => 1000)) end + def og_type + # the diaspora og namespace was already taken :( + meta_tag_with_property('og:type', 'joindiaspora:post') + end + def og_page_specific_tags(post) - [og_title(post), og_type(post), + [og_title(post), og_type, og_url(post), og_image(post), og_description(post)].join(' ').html_safe end -- GitLab