Fix fb share, redirect with js when the page is not requested by fb but by user

This commit is contained in:
Christophe Vilayphiou committed 2012-08-08 11:04:19 +08:00
1 parent a03d1ad10b
commit 05e61b63bb
3 files changed
+8 -4

No files matched your search

+6 -2
View File
@@ -3,8 +3,12 @@
<head>
<meta property="og:title" content="<%= @object.title %>" />
<meta property="og:description" content="<%= strip_tags @object.subtitle %>" />
<meta property="og:url" content="<%= @orig_url %>" />
<meta property="og:image" content="<%= 'http://' + request.env['HTTP_HOST'] + @object.image.url %>" />
<meta property="og:image" content="<%= ('http://' + request.env['HTTP_HOST'] + @object.image.url) unless @object.image.blank? %>" />
<script type="text/javascript">
<!--
window.location = "<%= @orig_url %>"
//-->
</script>
</head>
<body>
</body>