Twitter card is not dispalying

470 views Asked by At

I am getting the card preview but when i post a tweet i am not getting the photo.Cant figure out what is being missing.Any help would be appreciable

application.html

<% if content_for?(:head) %>
      <%= yield(:head) %>
<% end %>

index.html

    <% @feeds.each_with_index do |feed,i| %>
            <div>
              <% content_for :head do %>

                <meta name="twitter:card" content="summary" />
                <meta name="twitter:title" content="<%= feed["title"] %>" />
                <meta name="twitter:description" content="<%= feed["description"] %>" />
                <meta name="twitter:image" content="<%= feed["image"].present? ? feed["image"] : feed["json_data"]["img"] %>" />
                <meta name="twitter:url" content="http://<%= select_url %>/entry/<%= feed["slug"]%>" />

                <meta property="og:url" content="http://<%= select_url %>/entry/<%= feed["slug"]%>" />
                <meta property="og:image" content="<%= feed["image"].present? ? feed["image"] : feed["json_data"]["img"] %>"  />
                <meta property="og:image:width" content="400" />
                <meta property="og:image:height" content="300" />
                <meta property="og:title" content="<%=  feed["title"] %>" />
              <% end %>
            </div>
<% end %>
<% end %>
0

There are 0 answers