元标记无效的属性属性
当我在 Facebook 上发布网站网址时,我试图更改 Facebook 使用的默认缩略图。现在我已经访问了几个网站/论坛,并且存在很多困惑/差异。 大多数人说您应该在主页的 标记中包含以下行:
<link rel="image_src" href="url to your desired thumbnail image.jpg" />
现在我这样做了(许多其他人也这样做了),但事实并非如此工作(也为其他人)。不同网站上的其他一些人建议包括以下内容:
<meta name="fb" content="url to your desired thumbnail image.jpg" property="og:image"/>
在 ASP.NET (Visual Studio '10) 中,它表示 'property'
不是 'meta' 的有效属性 。
现在我应该在 html 标签中声明什么模式才能使属性成为“有效”属性。我去一些大网站查看他们的编码,发现 标签中声明了以下元标签:
<meta content="IE=100" http-equiv="X-UA-Compatible">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
我也尝试过,但 fb 仍然不使用我指定的图片用作缩略图。我的编码和网址没有损坏或任何东西,Visual Studio 调试它没有问题。
请帮忙...
谢谢
I'm trying to change the default thumbnail pic facebook uses when I post my website url on fb. Now I've been on a couple of websites/forums and there is a lot of confusion/differences about it.
Most people say that you should include the following line in the <head></head>
tag of your homepage:
<link rel="image_src" href="url to your desired thumbnail image.jpg" />
Now I did that (and so did many other people) and it doesn't work(for others as well). Some other folks on different websites suggested including the following:
<meta name="fb" content="url to your desired thumbnail image.jpg" property="og:image"/>
In ASP.NET (visual studio '10) it says that 'property'
is not a valid attribute of 'meta'.
Now what schemas should I declare in my html tags for property to be a 'valid' attribute. I went on some big websites to see their coding, and found the following meta tags declared in the <head>
tag:
<meta content="IE=100" http-equiv="X-UA-Compatible">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
I tried that as well but fb still doesn't use the pic I specified to be used as the thumbnail. My coding and url's are not broken or anything, visual studio debugs it without problems.
Please help...
Thank You
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试将以下
标记添加到
部分:
然后,在 Facebook URL Linter
使“property”成为
标签,您可能需要更改
。
Try adding the following
<meta>
tag into your<head>
section:Then, enter the URL of your page into the Facebook URL Linter
For 'property' to be a valid attribute of the
<meta>
tag, you might have to change your<!DOCTYPE ...>
.