Closed Afoster2 closed 3 years ago
Ok found a solution. After more digging, I found this: https://gorails.com/forum/sharing-on-social-network
<% content_for :head do %>
<!-- Open Graph tags -->
<meta property="og:title" content="<%= @article.title %>" />
<meta property="og:type" content="article" />
<meta property="og:url" content="<%= article_url(@article) %>" />
<meta property="og:description" content="<%= @article.body %>" />
<meta property="og:image" content="<%= absolute_image_url(img.attachment.url) %>" />
<meta property="fb:app_id" content="12345678" />
<!-- Twitter card property -->
<meta name="twitter:card" content="<%= @article.title %>">
<meta name="twitter:site" content="@mytwitter">
<% end %>
Solved. I don't know if it was the order in which I had the og tags or if it was removing the #{}
Trying to share to facebook takes a very long time to load and is FB seems to be ignoring my meta og fields.
Errors from facebook
reports show.html.haml
= social_share_button_tag(@report.title, :url => report_url(@report), desc: @report.title)
I have used this same setup for several projects previously and now they are all doing the same.