Error 404 when sharing on Facebook

admin

Administrator
Staff member
This issue has been posted and resolved a lot, but for some reason, I still can't share my new posts (using Wordpress) to Facebook, either directly on Facebook or using the Share plugin (by Jetpack) on my post. In both situations, it returns in a 404 not found. (with no image, no excerpt, but when clicked it redirects correctly on my post).
It worked fine few days ago.

I've made researches for few days now before asking here, and all the solutions I see didn't work for me.
I tried to use the Facebook link Debugger, a Facebook Like Fix plugin (that apparently worked for someone), debugging the link with www., adding some codes I found in articles about that etc.

I've been redirected to this post frequently (<a href="http://www.passwordincorrect.com/issue-with-sharing-wordpress-posts-to-facebook/" rel="nofollow">http://www.passwordincorrect.com/issue-with-sharing-wordpress-posts-to-facebook/</a>)
After thinking a lot what could causes this issue without finding it, I even thought if it could be possible (since my posts aren't scheduled) that this happened after I changed my time zone on Windows and, Wordpress would think I posted it "earlier"?

So I finally thought it had something to do with metas, unfortunately this is still kind of a mystery for me, and since that I think my header isn't properly written.

Here is what I got when using the Facebook Debugger on a particular post that I can't share :

Code:
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.

The Debugger works fine on the website itself though.

I really hope you guys could give me some <strong>advices</strong> on how to make it work. If any other details are needed, I'll be glad to add them in my post.

<hr>

<strong>POST EDIT :</strong>

So I kept looking to find where my issue comes from.
For some reasons now, I can't even re-scrape informations (using FB URL debugger) for my "website.com" and my olders posts "website.com/post-that-used-to-work", even though I can see the already existing scrape informations. (unlike the recents posts, where I can't see neither existing scrape or new scrape)

According to : <a href="https://developers.facebook.com/docs/sharing/best-practices" rel="nofollow">https://developers.facebook.com/docs/sharing/best-practices</a>, I added all the needed <strong>metas "og:"</strong> in my header, didn't work.

It seemed like something was already calling it, so I then installed the <strong>NGFB</strong> plugin that told me there were issues with Yoast SEO and Photon (by Jetpack).
I desactivated both of them, it didn't work.

I still got these errors when trying to debugg a link on <strong>a post</strong> when tryng to <em>re-scrape</em> informations :

Code:
Error parsing input URL, no data was cached, or no data was scraped.

On the <strong>website</strong> itself when <em>re-scrape</em> :

Code:
Object at URL 'http://website.fr/' of type 'website' is invalid because a required property 'og:title' of type 'string' was not provided.

When showing <em>existing scrape</em> informations of a <strong>non-working post</strong> :

Code:
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.

When clicking on <strong>See exactly what our scraper sees for your URL</strong> :

-<em>Non-working post</em> :

Code:
Document returned no data

-<em>The website itself</em> :

Code:
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;
&lt;meta http-equiv="Refresh" content="0;url=defaultsite"&gt;
&lt;!-- FR --&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;

And finally my current head part :

Code:
&lt;!doctype html&gt;
&lt;!--[if lt IE 7]&gt; &lt;html class="no-js ie6 oldie" &lt;?php language_attributes(); ?&gt;&gt; &lt;![endif]--&gt;
&lt;!--[if IE 7]&gt;    &lt;html class="no-js ie7 oldie" &lt;?php language_attributes(); ?&gt;&gt; &lt;![endif]--&gt;
&lt;!--[if IE 8]&gt;    &lt;html class="no-js ie8 oldie" &lt;?php language_attributes(); ?&gt;&gt; &lt;![endif]--&gt;
&lt;!--[if gt IE 8]&gt;&lt;!--&gt; &lt;html &lt;?php language_attributes(); ?&gt;&gt; &lt;!--&lt;![endif]--&gt;
&lt;head&gt;

&lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;
&lt;meta http-equiv="Content-Type" content="
&lt;?php bloginfo('html_type'); ?&gt;;
charset=&lt;?php bloginfo('charset'); ?&gt;" /&gt;
&lt;meta charset="&lt;?php bloginfo( 'charset' ); ?&gt;" /&gt;
&lt;meta name="description" content="Description (changed)"/&gt;
&lt;meta name="author" content="Author (changed)"/&gt;
&lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/&gt;
&lt;meta property="og:title" content="Title (changed)" /&gt;
 &lt;meta property="og:site_name" content="Site name (changed)"/&gt;
&lt;meta property="og:description" content="Description (changed)" /&gt;
&lt;meta property="og:url" content="http://website.fr" /&gt;



&lt;link rel="shortcut icon" href="&lt;?php echo THEME_DIR; ?&gt;/favicon.ico" /&gt;
&lt;link rel="alternate" type="application/rss+xml" title="&lt;?php bloginfo('name'); ?&gt; RSS2 Feed" href="&lt;?php bloginfo('rss2_url'); ?&gt;" /&gt;
&lt;link rel="pingback" href="&lt;?php bloginfo('pingback_url'); ?&gt;" /&gt;


&lt;title&gt;&lt;?php wp_title(); ?&gt; - &lt;?php bloginfo( 'name' ); ?&gt;&lt;/title&gt;

&lt;?php wp_head(); ?&gt;

&lt;/head&gt;

Everything works fine for Google+ and Twitter though.
I really hope someone could help me with my issue.