Html Facebook:The';og:image';属性,即使可以从其他标记推断出值

Html Facebook:The';og:image';属性,即使可以从其他标记推断出值,html,facebook,facebook-opengraph,meta,Html,Facebook,Facebook Opengraph,Meta,我读了很多关于这方面的帖子,但没有一个解决方案在我的案例中有效。读了这些书,我学到了很多东西,但我的问题仍然存在 我总是收到以下错误消息: 即使可以从其他标记推断出值,也应显式提供“og:image”属性 但在我的源代码中有: <meta property="og:image" content="http://www.shootmeagain.com/photo/Y2013/3769/saintvitus-oslo_30-03-2013_17.jpg" /> 我所有的标题都在这

我读了很多关于这方面的帖子,但没有一个解决方案在我的案例中有效。读了这些书,我学到了很多东西,但我的问题仍然存在

我总是收到以下错误消息:

即使可以从其他标记推断出值,也应显式提供“og:image”属性

但在我的源代码中有:

<meta property="og:image" content="http://www.shootmeagain.com/photo/Y2013/3769/saintvitus-oslo_30-03-2013_17.jpg" />

我所有的标题都在这里:

<!DOCTYPE html><html xmlns:og="http://ogp.me/ns#"><head><title>PHOTOS : Saint Vitus à Oslo (Rockefeller) le 30-03-2013 | Shoot Me Again Webzine.</title>
<meta charset="UTF-8">

<link rel=canonical href='http://www.shootmeagain.com/photos/3769_saintvitus_oslo_30-03-2013'>

<meta property="og:description" content="PHOTOS : Saint Vitus à Oslo (Rockefeller) le 30-03-2013 | Shoot Me Again Webzine." />
<meta property="og:title" content="PHOTOS : Saint Vitus à Oslo (Rockefeller) le 30-03-2013 | Shoot Me Again Webzine." />
<meta property="og:url" content="http://www.shootmeagain.com/photos/3769_saintvitus_oslo_30-03-2013" />
<meta property="og:type" content="website" />
<meta property="og:image" content="http://www.shootmeagain.com/photo/Y2013/3769/saintvitus-oslo_30-03-2013_17.jpg" />
<meta property='fb:admins' content='erikshootmeagain' />
<meta property='fb:app_id' content='146373435406736' />

<link rel=stylesheet href='http://www.shootmeagain.com/layout.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/layout600.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/layout900.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/layout1200.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/layout1600.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/layout1900.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/layoutheight.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/js/jquery-ui-1.11.3.custom/jquery-ui.css' type='text/css'>
<link rel=stylesheet href='http://www.shootmeagain.com/js/jquery-ui-1.11.3.custom/jquery-ui.theme.css' type='text/css'>
<link rel="shortcut icon" href="http://www.shootmeagain.com/images/favicon.ico">
<link rel="icon" type="image/gif" href="http://www.shootmeagain.com/images/animated_favicon1.gif">

<meta name='keywords' content='webzine, chroniques, photos, interview, concours, mp3, video, hardcore, rock, emo, screamo, metal, punk, garage'>
<meta name='author' content='ChamO'>
<meta name='publisher' content='ChamO'>
<meta name='viewport' content='width=device-width'>
<meta http-equiv="content-language" content="fr">

<link href='http://fonts.googleapis.com/css?family=Lato:100,200,300,400,500,600,700,800,900' rel='stylesheet' type='text/css'>

<script language="javascript" type="text/javascript" src="http://www.shootmeagain.com/js/jquery-1.11.2.min.js"></script>
<script language="javascript" type="text/javascript" src="http://www.shootmeagain.com/js/jquery-ui-1.11.3.custom/jquery-ui.min.js"></script>
<script language="javascript" type="text/javascript" src="http://www.shootmeagain.com/js/editPost.js"></script>
</head>
照片:圣维图斯奥斯陆(洛克菲勒)le 30-03-2013 |再拍我一次网络杂志。
以下是一个URL,例如:

有人有主意吗

非常感谢!
Erik

您可以通过在单独的行中添加
og:image
宽度
高度
alt
安全url
属性来解决此问题:

  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" content="630">
  <meta property="og:image:alt" content="description_of_site">
  <meta property="og:image:secure_url" content="https://your_domain/my_og_image.png">


这应该可以通过,尽管FB也会抱怨如果
FB:app\u id
太多,但您可以忽略此项。

您可以通过在单独的行中添加
og:image
宽度
高度
alt
安全url
属性来解决此问题:

  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" content="630">
  <meta property="og:image:alt" content="description_of_site">
  <meta property="og:image:secure_url" content="https://your_domain/my_og_image.png">


这应该可以通过,虽然FB也会抱怨如果
FB:app\u id
太多,你可以忽略这一点。

看起来你在每次加载页面时都随机切换og:image…?这不是一个好主意。Facebook会缓存这些数据,因此无论如何都不会产生预期效果。保持你的OG元数据不变,而不是一直更改它——这只是自找麻烦。看起来你在每个页面加载时都随机切换OG:图像…?这不是一个好主意。Facebook会缓存这些数据,因此无论如何都不会产生预期效果。保持你的OG元数据不变,而不是一直改变它——这只是自找麻烦。