Facebook在尝试共享页面时会记住上一张图片

Facebook在尝试共享页面时会记住上一张图片,facebook,asp.net-mvc-5,metadata,Facebook,Asp.net Mvc 5,Metadata,这让我快发疯了!我有一个页面,上面有一个共享按钮,为了参数起见,我在控制器中硬编码了图像名称和标题,如下所示 public ActionResult ThankYou() { var model = new LabCombination { ImageCombination = "danone_ultimate_coconut_vanilla.png", ImageTitle = "danone_ultim

这让我快发疯了!我有一个页面,上面有一个共享按钮,为了参数起见,我在控制器中硬编码了图像名称和标题,如下所示

 public ActionResult ThankYou()
    {
        var model = new LabCombination
        {
            ImageCombination = "danone_ultimate_coconut_vanilla.png",
            ImageTitle = "danone_ultimate_coconut_vanilla"
        };

        return View(model);
    }
在我看来,我是这样做的

  <meta property="og:title" content="Check out the flavour I just made! @Model.ImageTitle" />
  <meta property="og:description" content="Check out the flavour I have just created!" />
  <meta property="og:image" content="http://danone.staging-eurorscg.com.au/Content/Images/FlavourLab/CombinationSmall/@Model.ImageCombination" />
  <meta property="og:url" content="http://danone.staging-eurorscg.com.au/thank-you" />

其呈现如下

 <meta property="og:title" content="Check out the flavour I just made! danone_ultimate_coconut_vanilla" />
 <meta property="og:description" content="Check out the flavour I have just created!" />
 <meta property="og:image" content="http://danone.staging-eurorscg.com.au/Content/Images/FlavourLab/CombinationSmall/danone_ultimate_coconut_vanilla.png" />
 <meta property="og:url" content="http://danone.staging-eurorscg.com.au/thank-you" />

当我使用facebook刮板时,我看到了这一点

然而,当我进入新闻分享页面时,我看到了这一点

为什么facebook不令人耳目一新!我已清除浏览器中的缓存

你可以在这里把这页废掉

使用以下url

任何帮助都将不胜感激

< P> **更新**,当我动态地设置Meta数据时,它缓存原始信息,如图所示,在屏幕中部看到的是图像,也应该显示在共享对话框

中。

我的元数据看起来像这样

 <meta property="og:title" content="Check out the flavour I just made! Strawberry &amp; Honey" />
<meta property="og:description" content="Check out the flavour I have just created!" />
<meta property="og:image" content="http://danone.staging-eurorscg.com.au/Content/Images/FlavourLab/CombinationSmall/danone_ultimate_strawberry_honey.png" />
<meta property="og:url" content="http://danone.staging-eurorscg.com.au/thank-you" />


正如您所看到的,它包含所有正确的元数据。

这是因为您的共享按钮正在尝试共享url,而不是添加以下og元标记(当前时间):

<meta property="og:updated_time" content="1431713584" />

您可以使用调试器工具强制Facebook更新其缓存。它过去被称为url linter


这是我想分享的页面,所以当用户在FB上分享时,我不想让用户点击它并进入感谢页面,我希望他们进入falvour lab页面好的,我让它工作了,但facebook仍在缓存我更新中显示的以前的内容,你可以看到我选择了草莓和蜂蜜,然而,当共享时,它显示椰子,甚至我的元数据都是正确的……是的,Facebook会缓存标题。因此,不要每秒钟都更改它。标题需要更改请参阅我关于清除元数据的问题,因为我需要清除元数据