TPAC discoverability: include Open Graph Protocol markup for bonus points

Bug #1423585 reported by Dan Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

* Evergreen master

Shockingly, some clients do not grok schema.org markup. That's okay, there's another much lighter form of markup designed to facilitate social sharing: Open Graph Protocol (documented at http://ogp.me). And they can co-exist. We simply have to add a few <meta> tags to the <head> of the record detail pages, largely reusing what we already have.

Revision history for this message
Dan Scott (denials) wrote :

See http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1423585_open_graph_protocol for a working branch that adds rudimentary Open Graph Protocol markup to record detail pages and library pages.

We also change the simplistic "metalinks" scalar variable into a ctx.metalinks list variable so that we can iterate over it and ensure that it's available to populate on every page in the TPAC.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.8-beta
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Galen Charlton (gmc) wrote :

When I ran a record page through the Facebook Open Graph Object Debugger, it complained:

Object at URL 'http://dev-galen.esilibrary.com/eg/opac/record/1' is invalid because the configured 'og:type' of 'http://schema.org/book' is invalid.

I then tried it with:

<head prefix="og: http://ogp.me/ns# s: http://schema.org/">
...
<meta property="og:type" content="s:Book">

and it didn't like that either.

Do you have any guidance? Not necessary the end of the world if FB doesn't like that way of extending og:type but other consumers will accept it... but I guess I'd like some assurance that other consumers would.

Revision history for this message
Dan Scott (denials) wrote :

The list of types at http://ogp.me/#types is extremely limited. We could special case a "if schema book, then just book" but I highly doubt it's worth it. Otherwise, outside of video, music, article, and book, everything is a website. That's just dumb.

And, really, most sharing sites only care about title, image, and url, because the OGP types are almost useless. In the end, OGP is RDFa, so schema.org types are technically valid, and I'd rather express the greater richness of schema.org here.

Revision history for this message
Dan Scott (denials) wrote :

Oh, and Facebook's own docs say: "You can also specify your own types via Open Graph." https://developers.facebook.com/docs/sharing/best-practices

So that's what we're doing. If you want to see a better making of schema types to the native available OGP types, I could consider that an acceptable bug. But I don't think it's a necessary precondition for merging.

Revision history for this message
Galen Charlton (gmc) wrote :

I'm not seeing examples of arbitrary URIs as og:type values, either in this Facebook example of creating a custom type:

https://developers.facebook.com/docs/opengraph/creating-custom-stories#objecttypes-define

(where apparently singular and plural nouns are preferred)

or this more worked out example:

http://www.productontology.org/

But I'm willing to accept either that it doesn't matter for most consumers or that if it turns out that OpenGraph consumers really prefer CURIEs for types, that we'll put that in later.

Consequently, I'll write up a release note blurb and push.

Revision history for this message
Galen Charlton (gmc) wrote :

And pushed. Thanks, Dan.

(Though I must confess to some qualms about what richer RDFa markup would mean if ever we added a Facebook "Like" button to the record details page.)

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
assignee: Galen Charlton (gmc) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.