I'm working on a few e-commerce applications where I'd like users to be able to 'Like' products. It's not always possible to embed the og:
meta tags on the page that's being 'Liked', either because it's not in our control, or because it's deep in an AJAX application.
I've hit upon the idea of building a proxy for OpenGraph objects. I can point the Like button to the proxy URL, which will serve up all the og:
metadata describing the product, including a canonical URL.
The trouble is that Facebook follow the canonical URL and parse that for metadata, rather 开发者_StackOverflow社区than the proxy page.
Is this a bug in FB's parser, or am I missing something?
I'd appreciate any help or clarification you could offer.
Thanks in advance,
Ross
If you're using the <link rel="canonical" ...>
tag, maybe try to exclude it from the proxy page's source code when the user-agent of the user is the Facebook user-agent. This way, user's browsers and search engines see and recognize the canonical url, and the Facebook page crawler doesn't.
精彩评论