为什么Facebook上的共享页面不显示图像?

时间:2016-11-28 05:34:29

标签: php html facebook meta

所以,我有这篇文章页面有时会发布600x315尺寸的图像,大多数都不到100kb。

以下是我在article.php网站上使用的元数据,但当我在Facebook上分享帖子时,图片部分显示空白。我在这些元素上缺少的是什么?

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="<?php echo $row['keyword']; ?>">
<meta name="description" content="<?php echo metadesc($row['description']); ?>">
<link rel="canonical" href="<?php echo $site_path.$url; ?>" />

<!-- for Facebook -->          
<meta property="og:title" content="<?php  echo ucletters($row['title']); echo ' | '; echo $site_name;?>" />
<meta property="og:type" content="article" />
<meta property="og:image" content="<?php echo $site_path.'uploads/images/'.$row['image']; ?>" />
<meta property="og:image:width" content="200" />
<meta property="og:image:height" content="200" />
<meta property="og:url" content="<?php echo $site_path.$url; ?>" />
<meta property="og:description" content="<?php echo metadesc($row['description']); ?>" />

<!-- for Twitter -->          
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="<?php  echo ucletters($row['title']); echo ' | '; echo $site_name;?>" />
<meta name="twitter:description" content="<?php echo metadesc($row['description']); ?>" />
<meta name="twitter:image" content="<?php echo $site_path.'uploads/images/'.$row['image']; ?>" />

1 个答案:

答案 0 :(得分:2)

访问 Facebook developer debug tool

用你的网址检查问题。阅读他们的指导方针,这肯定会有用。祝你好运