Why is Facebook returning the wrong page (affects Facebook Like and Share URL)?
Asked Answered
C

1

8

When we first put up a blog post, Facebook often (but not always) gets confused about what the page is. Specifically, if you try to use the Like button on the blog page OR if you try to share via the Share link on your profile, Facebook will see the root blog page rather than the actual post page.

For example, we recently posted: http://thisorthat.com/blog/2010-song-of-the-year-round-1-results

If the user "likes" it, it returns the title for: "http://thisorthat.com/blog"

When you run the post URL through the FB Linter, you can see the problem. "http://developers.facebook.com/tools/linter?url=http://thisorthat.com/blog/2010-song-of-the-year-round-1-results"

In the Debug section it shows an extra og:title, og:url, description and og:image (the last 4 rows of the Debug section). This is the meta data from the root directory. What we cannot figure out is why. Why is Facebook seeing the correct meta data on the page and then also pulling the meta data from the root directory (and using that incorrectly to populate the data for the Like button and the Share URL tool)?

One other oddity. FB "figures it out" after a few days. Of course, by that time relatively few people are viewing the post.

UPDATE -- I want to thank Peter Bailey again for his answer, but we also discovered that there was another issue that we had to resolve before the Like button worked.

The issue was that we were displaying the Facebook the Like button on a post that was not yet published. The problem with this is that FB then can't resolve the URL and "guesses" as to the correct URL. In our case, it always guesses thisorthat.com/blog. Unfortunately, it then caches that guess for a number of days and that cache cannot be cleared by the Linter. So the ultimate solution was to both fix the og:type as Peter suggested, but also to remove the Like button from the blog post preview. It's very important that you don't show FB a page before it's published or if you do, change the URL.

Clap answered 19/1, 2011 at 17:35 Comment(0)
A
13

Pretty sure it's your Open Graph type that's the problem.

<meta content="website" property="og:type"/>

Per the documentation

Use article for any URL that represents transient content - such as a news article, blog post, photo, video, etc. Do not use website for this purpose. website and blog are designed to represent an entire site, an og:type tag with types website or blog should usually only appear on the root of a domain.

Alliber answered 19/1, 2011 at 18:10 Comment(1)
We just made that change and it appears to be working now. Thanks so much, Peter! We've been struggling with this for months!Clap

© 2022 - 2024 — McMap. All rights reserved.