元标记和开放图协议问题

时间:2018-08-14 15:22:50

标签: html asp.net-mvc html5 seo open-graph-protocol

我在页面上使用了打开的图形,但不幸的是它不起作用,我也不明白为什么。

Mvc代码:

@section MetaTags
{
    <meta name="keywords" content="@Model.GoogleKeywords" >
    <meta name="description" content="@Model.GoogleDesc" >
    <meta property="og:type" content="product" >
    <meta property="og:image" content="@Model.MainImageUrl?w=200" >
    <meta property="og:title" content="@Model.Name" />
    <meta property="og:description" content="@Model.GoogleDesc" >
    <meta property="og:url" content="@(Request.Url.Scheme)://store.com/products/@Model.Url.ToLower()" >
    <meta property="og:site_name" content="SiteName" >
}

输出:

<meta name="keywords" content="Machin , Store" >
<meta name="description" content="Machin" >
<meta property="og:type" content="product" >
<meta property="og:image" content="http://store.com/ProductImages/Images_f93cc5d0-70ff-444f-bcdc-0415b8b6a2f3/TWD25-min - Copy (2).jpg?w=200" >
<meta property="og:title" content="Machin Tit" />
<meta property="og:description" content="Machin" >
<meta property="og:url" content="http://store.com/products/e7673dbc-b375-4de4-abe0-8fd985e6697f" >
<meta property="og:site_name" content="SiteName" >

我在哪里弄错了?

谢谢。

1 个答案:

答案 0 :(得分:0)

您是否尝试过使用:

https://developers.facebook.com/tools/debug/

它应该准确地告诉您问题所在(理论上)