【问题标题】:Facebook wordpress site sharing with the wrong imageFacebook wordpress 网站共享错误图片
【发布时间】:2014-11-05 13:52:27
【问题描述】:

我在使用 wordpress 网站和 facebook 共享时遇到了问题。我的网站没有任何分享按钮,我所说的分享是当任何用户将 url 粘贴到 facebook 时,出现的图像是一些随机图像而不是我想要出现的徽标。

到目前为止我已经尝试过:

<meta property="og:url" content="http://example.com">
<meta property="og:title" content="example name">
<meta property="og:site_name" content="example name">
<meta property="og:image" content="http://example.com/wp-content/uploads/2014/03/logo_example.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="105">
<meta property="og:image:height" content="72">
<link rel="image_src" type="image/png" href="http://example.com/wp-content/uploads/2014/03/logo_example.png" />

此代码为示例,图片链接无效。

【问题讨论】:

  • 您是否查看过可以为您自动将所有这些打开的图形数据添加到每个页面的 WordPress 插件?我以前使用过wordpress.org/plugins/wp-open-graph 并取得了很大的成功。 LinkedIn 和许多其他网站也使用 Open Graph。此插件可让您指定每个帖子/页面的图像和文本或站点范围的默认值

标签: php wordpress facebook


【解决方案1】:

我的解决方案:

在这个站点:https://developers.facebook.com/tools/debug/og/object/ 我可以调试 facebook 元标记,发现我的图像必须至少为 200x200 像素。因为它不是,facebook 总是有其他图像来建立共享。所以,我不得不更改我的图像并删除宽度和高度元标记。

【讨论】:

    猜你喜欢
    • 2018-01-16
    • 1970-01-01
    • 1970-01-01
    • 2016-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-28
    • 1970-01-01
    相关资源
    最近更新 更多