For og:image
and og:url
, since they have URL, can I place them in a link
tag instead of a meta
tag, and is it preferable?
I don't know about other major consumers of the OGP so this might not be a problem for your case, but if you plan to implement it for Facebook,
Doing a quick live test with the open graph debugger and fiddling with the og:
tags, it appears that facebook only recognizes them if they are placed in s.
If you create an empty HTML file with a single og:url
tag in its section, upload it to any URL and run it through the debugger above, both
and
edit or, as suggested in the comments
will fail to parse and return the original URL, while
parses correctly and returns the contents of The Rock on IMDb instead. At the end of the day semantics are nice, but working code is even better.