强制Facebook OG图像一致性

时间:2014-12-05 19:48:42

标签: facebook image facebook-graph-api facebook-opengraph meta-tags

Facebook OG Image的东西是一场噩梦。你如何解决保持图像一直出现在Facebook上的权利?我目前正在努力为网站论坛设置默认图像。该论坛在phpBB中。我已将此代码添加到标题中。

<meta property="og:image" content="https://fyxtrpg.com/wp-content/gallery/assets/fyxt-rpg-forum-default-facebook-image.jpg" />
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="484">
<meta property="og:image:height" content="252">

将图像设置为应该具有的确切大小。我甚至告诉Facebook。但它仍然削减了两端。

我也收到错误消息,说它无法下载图片,或者图片太小。它不小,超过200px分钟。它也列在调试器中,显示Facebook确实可以下载它。

我的网址:https://fyxtrpg.com/fyxt-forum/viewtopic.php?f=7&t=128

Facebook调试信息

Time Scraped    2 seconds ago
Response Code   206
Fetched URL https://fyxtrpg.com/fyxt-forum/viewtopic.php?f=7&t=128
Canonical URL   https://fyxtrpg.com/fyxt-forum/index.php
Notice
Warnings That Should Be Fixed
og:image could not be downloaded or is too small    og:image was not defined, could not be downloaded or was not big enough. Please define a chosen image using the og:image metatag, and use an image that's at least 200x200px and is accessible from Facebook. Image 'https://fyxtrpg.com/wp-content/gallery/assets/fyxt-rpg-public-beta-logo.jpg' will be used instead.
To find the object, these are the redirects we had to follow
original    https://fyxtrpg.com/fyxt-forum/viewtopic.php?f=7&t=128
og:url  https://fyxtrpg.com/fyxt-forum/index.php
The following will be treated as a redirect by the crawler:
A HTTP redirect
A <link rel="canonical" href=".." /> tag
A <meta property="og:url" content=".." /> tag
The final URL, which we tried to extract metadata from is highlighted in bold
These are the raw tags that we found
Meta Tag    <meta property="og:url" content="https://fyxtrpg.com/fyxt-forum/index.php" />
Meta Tag    <meta property="og:title" content="Fyxt RPG Forums" />
Meta Tag    <meta property="og:description" content="The free to play Fyxt RPG system offers RPG players a fun, fast, and flexible RPG experience. Play any genre, setting, or character for free with Fyxt RPG!" />
Meta Tag    <meta property="og:image" content="https://fyxtrpg.com/wp-content/gallery/assets/fyxt-rpg-forum-default-facebook-image.jpg" />
Meta Tag    <meta property="og:image:type" content="image/jpeg" />
Meta Tag    <meta property="og:image:width" content="484" />
Meta Tag    <meta property="og:image:height" content="252" />
Based on the raw tags, we constructed the following Open Graph properties
og:url  https://fyxtrpg.com/fyxt-forum/index.php
og:type website
og:title    Fyxt RPG Forums
og:image    
og:description  The free to play Fyxt RPG system offers RPG players a fun, fast, and flexible RPG experience. Play any genre, setting, or character for free with Fyxt RPG!
og:updated_time 1417807331

正如您所看到的,调试器说它无法找到它,然后向我显示它实际发现的所有数据。

当我发布图片被裁剪,但如果我删除它并手动上传它很合适。这是不可接受的,我需要知道,任何从网站上分享内容的人都会有一个像样的图像。不是一个被切碎或扭曲的人。

如何解决此问题,以便Facebook看到图像并正确显示,一致?

是否有人建议确保网站的所有链接都是X尺寸照片/缩略图?这真是令人沮丧,因为有时候Facebook会使用肖像,有时候会使用风景,有时候会使用正方形。我甚至注意到它使用不同的方法发布相同的图片。这使得很难确保Facebook上的图像看起来很好。

感谢您的建议和帮助!

更多信息已添加...我还发送了许多Facebook错误报告,因为这些内容需要修复。

我还发现Facebook在创建和发布之间并不一致。这包括分辨率,比例和其他一些事项。这是我在一个尝试过的帖子上发现的一个烂摊子。

如果有人有任何建议,我很想知道如何真正使用Facebook及其API,而不是反对...

Facebooks Many Image Errors

1 个答案:

答案 0 :(得分:0)

过去几天我一直在处理这件事。 Facebook似乎只将OG标签作为建议。我发现如果你的图像更接近正方形,并且它找到了一个足够大的图像,它更接近它的理想纵横比,那么它就会使用那个。

此外,即使他们说最小值是600px X 315px,他们确实更喜欢1200px X 630px以上的图像。

https://developers.facebook.com/docs/sharing/best-practices#images