【发布时间】:2015-10-16 14:57:57
【问题描述】:
这个问题已经发布并解决了很多,但由于某种原因,我仍然无法将我的新帖子(使用 Wordpress)分享到 Facebook,无论是直接在 Facebook 上还是在我的帖子中使用分享插件(由 Jetpack 提供) .在这两种情况下,它都会返回 404 not found。 (没有图片,没有摘录,但是当点击它时,它会在我的帖子上正确重定向)。 几天前它运行良好。
在问这里之前我已经进行了几天的研究,我看到的所有解决方案都对我不起作用。 我尝试使用 Facebook 链接调试器,一个 Facebook Like Fix 插件(显然对某人有用),使用 www. 调试链接,添加一些我在文章中找到的代码等。
我经常被重定向到这个帖子 (http://www.passwordincorrect.com/issue-with-sharing-wordpress-posts-to-facebook/) 在考虑了很多可能导致这个问题但没有找到它之后,我什至认为是否有可能(因为我的帖子没有安排好)这发生在我在 Windows 上更改了我的时区之后,Wordpress 会认为我发布了它“早点”?
所以我终于认为它与元数据有关,不幸的是这对我来说仍然是一个谜,因为我认为我的标题没有正确编写。
这是我在无法分享的特定帖子上使用 Facebook 调试器时得到的结果:
Critical Errors That Must Be Fixed
Bad Response Code URL returned a bad HTTP response code.
Warning
Errors That Must Be Fixed
Missing Required Property The 'og:type' property is required, but not present.
Notice
Warnings That Should Be Fixed
Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.
调试器在网站本身上运行良好。
我真的希望你们能给我一些建议,让我知道如何让它发挥作用。如果需要任何其他详细信息,我很乐意在我的帖子中添加它们。
后编辑:
所以我一直在寻找我的问题来自哪里。 由于某些原因,我什至无法为我的“website.com”重新抓取信息(使用 FB URL 调试器),而我的老年人发布“website.com/post-that-used-to-work”,即使我可以看到已经存在的抓取信息。 (与最近的帖子不同,我看不到现有的刮擦或新刮擦)
根据:https://developers.facebook.com/docs/sharing/best-practices,我在标题中添加了所有需要的 metas "og:",但没有用。
似乎已经有人在调用它,因此我安装了 NGFB 插件,该插件告诉我 Yoast SEO 和 Photon(Jetpack 提供)存在问题。 我把它们都关掉了,没用。
在尝试重新抓取信息时尝试调试帖子上的链接时,我仍然遇到这些错误:
Error parsing input URL, no data was cached, or no data was scraped.
重新抓取时在网站本身:
Object at URL 'http://website.fr/' of type 'website' is invalid because a required property 'og:title' of type 'string' was not provided.
当显示非工作帖子的现有抓取信息时:
Critical Errors That Must Be Fixed
Bad Response Code URL returned a bad HTTP response code.
Errors That Must Be Fixed
Missing Required Property The 'og:type' property is required, but not present.
Warnings That Should Be Fixed
Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.
点击查看我们的抓取工具对您的网址所看到的确切内容:
-非工作岗位:
Document returned no data
-网站本身:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="Refresh" content="0;url=defaultsite">
<!-- FR -->
</head>
<body>
</body>
</html>
最后是我现在的头部:
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 8]><!--> <html <?php language_attributes(); ?>> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-Type" content="
<?php bloginfo('html_type'); ?>;
charset=<?php bloginfo('charset'); ?>" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="description" content="Description (changed)"/>
<meta name="author" content="Author (changed)"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta property="og:title" content="Title (changed)" />
<meta property="og:site_name" content="Site name (changed)"/>
<meta property="og:description" content="Description (changed)" />
<meta property="og:url" content="http://website.fr" />
<link rel="shortcut icon" href="<?php echo THEME_DIR; ?>/favicon.ico" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS2 Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<title><?php wp_title(); ?> - <?php bloginfo( 'name' ); ?></title>
<?php wp_head(); ?>
</head>
不过,对于 Google+ 和 Twitter,一切正常。 我真的希望有人可以帮助我解决我的问题。
【问题讨论】:
-
如果您的系统返回 HTTP 状态码 404,那么这与您的元标记无关。首先,当您在浏览器中请求它时,您应该检查返回的相同 URL 是否带有正确的状态代码(大多数情况下为 200)。 (您浏览器的开发者工具中的网络面板将帮助您验证这一点。)如果不是,那么您的系统设置就会出现严重错误。 […]
-
[...] 如果 确实 返回了正确的状态码,但只有 FB 刮板得到 404 - 那么你应该检查你安装的插件 - 也许其中一个看到它作为它以某种方式“对抗机器人”的工作,并将 FB 抓取工具的请求识别为“不良”,因此试图告诉它所请求的资源不存在。
-
OK so : 1# 在不工作的页面上,我认为有问题,因为我有很多旧页面/帖子中不存在的错误。图片会有所帮助:image.noelshack.com/fichiers/2015/30/1437911541-errors.jpg 2# 另一方面,工作(共享)的旧页面没有错误,但也没有网络活动:image.noelshack.com/fichiers/2015/30/… 我可能承认我真的迷失在这一切中......编辑:我最近更新到 WP 4.2.3,这可能是问题吗?像不干净的安装?
-
这些错误似乎不是“针对”主文档,而是由嵌入页面的外部脚本引起的——这不应该影响 FB 刮板看到的实际文档。文章页面本身的实际 URL 显示的 HTTP 响应代码是什么?
-
我认为响应代码显示在我链接的第一张图片中。使用 http 状态检查器,页面的 URL 不起作用(用于共享)返回 200 代码。