0

致力于尝试创建推特卡。我在页面标题中有以下元标记。出于某种原因,当我将链接放入我的推文时,推特卡没有被呈现。有什么建议么?

<!--- og: tags to create nice facebook & twitter posts for an auction --->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@herberzt_dev" />
<meta name="twitter:creator" content="@herberzt_dev" />
<% if !@item.nil? %>
    <meta property="og:title" content="<%= @item.name %>"/>
    <meta property="og:type" content="website"/>
    <meta property="og:url" content="<%= request.original_url %>"/>
    <meta property="og:image" content="<%= @item.photo(:thumbnail) %>"/>
    <meta property="og:description" content="<%= @item.description %>"/>
    <meta name="twitter:site" content="@herberzt_dev">
<% elsif !@auction.nil? %>
    <meta property="og:title" content="<%= @auction.name %>"/>
    <meta property="og:type" content="website"/>
    <meta property="og:url" content="<%= request.original_url %>"/>
    <meta property="og:image" content="<%= @auction.photo %>"/>
    <meta property="og:description" content="<%= @auction.description %>"/>
<% end %>
4

1 回答 1

0

应该这条线;

<% elsif !@auction.nil? %> 

是:

<% elseif !@auction.nil? %>
于 2015-12-11T17:31:11.803 回答