I’ve successfully added a Facebook like button to my page, using opengraph tags to define it as an object in the graph so it is liked as an object, rather than a link.
I am using an ogtype=product meta tag, but the Facebook parser generates an error (see below) which seems to be elated to the fact Facebook no longer support the “product” type.
When liking the object, it is shown as a “Product / Service”. This seems good, but with the parser error, and a need to understand a bit more, I’d like to resolve it and take the advice given to implement my own custom type which I may full use later.
My pages are review pages for existing product (single object product, multiple reviews on the same page), so I need to define a custom namespace to be able to do this. However, I am not sure I am doing it right…
I’m a little confused in general because it seems I have to have an app in order to do this and define a custom object and action (even though I have no immediate plans to utilise an action).
So I have setup a namespace (mySiteName) in my “App” in Facebook and I have defined an object “ski” and action “review” (for later).
Then comes my custom name space declaration:
http://ogp.me/ns#mySiteName:
http://ogp.me/ns/apps/mySiteName#“>
This initially passed the debug test, but then I noticed I had an extraneous tag which I removed and I got a load of new errors:
Initial debug error:
The parser’s result for this metadata did not match the input
metadata. Likely, this was caused by the data being ordered in an
unexpected way, multiple values being given for a property only
expecting a single value, or property values for a given property
being mismatched. Here are the input property =>content pairs that
were not seen in the parsed result: ‘og:type => product’
Code (no errors):
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang}" lang="{lang}" xmlns:fb="http://ogp.me/ns/fb#">
<head>
<head prefix="og: http://ogp.me/ns#mysitename: http://ogp.me/ns/apps/mysitename#">
<meta property="og:type" content="mysitename:ski" />
New debug error removing extra where only the mysitename namespace seems to be used:
Extraneous Property: Objects of this type do not allow properties
named ‘og:mysitename:type’. Extraneous Property: Objects of this type
do not allow properties named ‘og:mysitename:title’.etc
Meta Tag: Meta Tag:
etc
Thanks for any input – I’ve been trying things for hours with no joy.
The parser works against the current Open Graph APIs, but ‘og:type = product’ is from the earlier version of the markup which was launched with the Like button in 2010 – documentation currently here: https://developers.facebook.com/docs/opengraphprotocol/
It should still work, but Facebook’s Debug Tool won’t pass it, as it’s looking for tags associated with the Custom actions and objects markup used with the current version of the Open Graph
For custom objects, the title, etc should be added with
og:title, notog:namespace:titletags, maybe that’s the issue with your ‘ski’ object?In the Open Graph settings for your app, the object definition has a ‘get code’ button beside it which includes sample tags for that object:
– see how that compares to what you’re doing