OpenGraph (Facebook preview) tags for the images shown on a Page

Bug #1194853 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
Wishlist
Unassigned

Bug Description

While trying to share my own delightful endless loop of a kākā at a feeding station with a Facebook friend, I realized that Mahara doesn't provide the OpenGraph tags necessary for Facebook to show the images on a Page in its preview.

So, we should add those.

The most important page to do this on is the main Page display, /view/view.php . It would also make sense to do it on /artefact/view.php (for image artefacts), and possibly on the Profile page, and any other pages that can be publicly accessible which I may have forgotten (perhaps the Site home page for logged-out users?)

Probably the cleanest way to do this is to add a function to the artefact API (and/or the block API?), which asks each one whether it wants to post any OpenGraph tags. It would also make sense for the Images to use their "preview" image (the one you see on artefact/view.php) rather than the image itself.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

If you're curious about the delightful endless loop of a feeding kākā: https://mahara.org/user/aaronw/endless-kaka ;)

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

We already implemented the Facebook logo back in 1.6, but FB made changes soon after the release. I think Son had fixed it up once since. So looking at that existing code might help as some of that infrastructure that you need should already exist.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Yep, in 1.7 we added OpenGraph meta tags: https://bugs.launchpad.net/mahara/+bug/1072850

But they just hard-code in a site logo as the only preview image for any page on the site.

Also, it seems like Facebook has rearranged the OpenGraph documentation a bit since we were working on that WR. The new documentation is here: https://developers.facebook.com/docs/opengraph/using-objects/

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Let's try to get this into 15.10. It's not a big piece of work.

Changed in mahara:
milestone: none → 15.10.0
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 15.10.0 → 16.04.0
importance: Medium → Wishlist
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 16.04.0 → 16.10.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.0 → 16.10.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
Changed in mahara:
assignee: Aaron Wells (u-aaronw) → nobody
milestone: 17.04.0 → 17.10.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 17.10.0 → 18.04.0
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 18.04.0 → none
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.