Skip to content
Extraits de code Groupes Projets
Valider bec7b96d rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

add more og markup; send over large image re FB's request

parent 73c91463
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter