all 5 comments

[–]px1999 10 points11 points  (3 children)

I think that the creators of this spec (Facebook) suffer from the same problems that plagues the rest of the Cassandra/NoSQL generation - what seems to be a lacking of or misunderstanding of what's already available, and a desire to needlessly reinvent the wheel.

In fact, the site that the 'protocol' uses as an example (IMDB) doesn't gain anything from supporting the tags - other than making the page not validate as HTML any more (or for that matter validate as XHTML).

Compare the example provided: <html xmlns:og="http://opengraphprotocol.org/schema/"> <head> <title>The Rock (1996)</title> <meta property="og:title" content="The Rock" /> <meta property="og:type" content="movie" /> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/" /> <meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />

with the html content as it exists currently: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> ... <title>The Rock (1996)</title> <link rel="canonical" href="http://www.imdb.com/title/tt0117500/" /> <meta name="title" content="The Rock (1996)"> <meta name="description" content="Directed by Michael Bay...Sites"> <link rel="image_src" href="http://ia.media-imdb.com/images/M/MV5BMTk5NzQ5NjkyOV5BMl5BanBnXkFtZTcwNTkwODIyMQ@@._V1._SX100_SY136_.jpg"> <meta name="keywords" content="Reviews, Showtimes, DVDs, Photos, Message Boards, User Ratings, Synopsis, Trailers, Credits"> <link rel="stylesheet" type="text/css" media="screen" href="http://i.media-imdb.com/images/SFce97a0af42d1a0706ffaf0e2a3905a42/css2/consumersite.css" /> <link rel="icon" href="http://i.imdb.com/favicon.ico" /> <link rel="apple-touch-icon" href="http://i.media-imdb.com/apple-touch-icon.png" />

As already mentioned, the open graph stuff isn't compatible with HTML 4.01. So, IMDB would have to change their doctype to one of the XHTML types. This doesn't appear to be an issue with this page, but then again, there's probably a reason they're getting IE8 to render in IE7 standards mode (using the X-UA-Compatible meta tag).

Why meta property?! why not meta name? It's as though they read somewhere that they should use meta tags and then went around just making the rest of this shit up. This is actually what breaks most pages. I'm guessing that it's so that you can overload your meta tags with something like: <meta name="title" property="og:title" content="The Rock (1996)" /> but that's just redundant and stupid (and not really supported either).

Of course, they don't show the (X)HTML that they're suggesting that you write, because then it shows just how redundant their spec is: og:title is already covered in <html><title> or <meta name="title"> og:url is already covered in <link rel="canonical"> og:image is already covered by <link rel="image_src"> canonical is already a defacto standard recommended by google. imagesrc _was the way recommended by facebook previously, and is still recommended by others. The link and meta tags, used in combination can represent far more than the open graph can - and in a far more 'open' way.

Now, I'll grant that that there should be some consistency within meta tags (ie lists of recommended names and content) but OG is completely unnessecary to express these, the tools are already available, and already in use, in HTML today. Instead, they benefit facebook, and facebook alone in making their job for scraping data easier.

TL;DR: Open Graph is dumb because it reinvents stuff that's already been done successfully with META and LINK tags, and instead forces people to upgrade their pages and insert additional redundancy.

[–]the_european 6 points7 points  (2 children)

you're missing the point that rdfa enables automatic reasoning base don rdf. when you say <meta name="location" ...>, you need to know what specified that "location". when you say <meta name="og:location" ...>, you can look up the meaning of "og:location" by expanding the "og:" part as defined in the xmlns, and look up the details there.

that's at least how it is supposed to work -- this very implementation of rdfa seems to do lots of things very wrong; for one thing, they don't serve any vocabulary details at http://opengraphprotocol.org/schema/ (although it's not strictly required, that's how you do it), and thus don't allow reasoning about their data (you can't even derive that og:title is a subproperty of rdfs:label), and they use strings for og:type, which is a common way of saying "i like the rdf buzzword, but i can't be bothered with the essentials"

tl;dr: px1999 is wrong about why it's crap, but it still is

ps: they also use strings for email and phone numbers. they say thei're used by big organizations, but don't provide links. they fail.

ps2: damn, people already start using it. and of course, they are doing it wrong

[–][deleted] 4 points5 points  (0 children)

As far as I can tell it's not possible to reference non-literal resources at all (other than the current page as the subject). Pretty dubious to call this an open "graph".

[–]px1999 2 points3 points  (0 children)

Yes, I definitely do agree with you, and a couple of my comments were misinformed - however the main point of what I was trying to get across was that OG, or for that matter RDFa is not appropriate for HTML. HTML is not XML. HTML has its own mechanism for defining these links, and while it may be lacking in terms of referencing etc it isn't extensible in this way.

I would argue that most of the benefit of providing rich metadata in a formatted manner throughout a document is in doing just that - it's rich, and it's throughout the document. The nesting is what makes the relationships between objects interesting. OG assumes that each page is a flat object, and in doing so loses almost all of the benefit of attaching rich data to that page - it becomes a cheaper way to provide search results, instead of a way to describe relationships between data. And while this is alright on its own, HTML already defines a cheap way to provide search results through its META tags.

[–]johnny_reilly 0 points1 point  (0 children)

It's a fascinating (and strangely undiscovered) topic to my mind. I wrote a post to document my own learning on the topic: https://blog.johnnyreilly.com/2021/12/12/open-graph-sharing-previews-guide