I’ve been searching and testing for a solution the last 3 hours now.
I wanna be able to like the following link. Please note that this is the only category implementing the Like button right now and I have hard coded a quick fix.
I have implemented the like button and it works so far (It’s hidden for now however). The problem arise when I try to add the OG meta data specified by Facebook. I have used the facebook debugger to find out what is wrong.
As you might notice the query string includes slashes which Facebook encodes. Obviously this was the first thing I tried to adjust. And believe me. I have tried everything here. Replacing / with %2F, encoding other special chars like & etc. My conclusion was that facebook arrives to the address with the slashes, encodes the content in the og:url property and therefor kind of mismatch somehow. I found more people having problems with slashes in the url but none of the solutions have worked out for me. I saw a note that content-length missing in the header could be a problem for the spider to handle, but adding it made no difference.
Change of doctype, temporarily remove other meta tags, change their order etc. have not made any effect.
The only thing that makes a difference is if i input the encoded version of the link in the debugger (http://www.d-gear.se/?page=%2Fshop%2Fbcat&c=144). The error is then gone (warnings remaining) but as you see it still can’t find the og-tags in the document.
As a final way to get any clue I tried the following while following the original category link.
<meta property="og:url" content="http://www.d-gear.se/" />
It made absolutely no difference at all. In the debugger the same error arises and the information under redirect path is:
original http://www.d-gear.se/?page=%2Fshop%2Fbcat&c=144
rel=”canonical” http://www.d-gear.se/?page=%2Fshop%2Fbcat&c=144
I checked the source code of the page and it had been updated to http://www.d-gear.se/ there. (Now I have changed back to the intended canonical URL again)
It’s probably one really easy solution to this, but I’m stuck here and don’t wanna waste the rest of the evening in case someone here is able to just point out the error to me.
After a few more hours of testing I noticed that charset was set to LATIN-1. Changing it to ISO-8859-1 made the difference. (Somewhere deep inside my brain I think I read that those two are the same)