Add support for twitter cards (full image viewer only) (rebased onto develop)#5797
Conversation
Rename property as omero.web.sharing.twitter to provide a namespace for other sharing options.
|
--rebased-from #5795 |
|
@manics : do you want to try to get this into 5.4.8? If so, suggestions on how/where to configure it for testing? |
|
I figured I should at least test it myself before getting someone else to. |
??? |
👍 other than deciding on the long-term testing strategy as well as follow-ups (like adding to iviewer, etc) |
It's the easiest way to demo a public server! |
Sure, but don't underestimate the confusion it might cause. |
|
If anyone's trying to understand the example, I'd second Josh's concern re: the confusion. Is it much more effort to create a "public_user_omero_account" for the sake of clarity? |
|
Can you review ome/omero-server-docker#2 then? |
|
Sorry, this got lost between other excluded PRs and so didn't make it into rc1. Will merge with other changes for GA. |

This is the same as gh-5795 but rebased onto develop.
This is the same as gh-5216 gh-4613 gh-4260 but rebased onto metadata54.
Includes gh-5245 rebased onto metadata54.
I've had this lurking around since January 2014. Given that we now have a public resource and Twitter no longer require manual approvals I thought it's time to resurrect it. See https://dev.twitter.com/cards/types/summary-large-image
The
titleanddescriptionfields are mandatory, I'm assuming there will always be a non-empty image name, description is set to the owner's name if empty.At risk of stating the obvious this can only be tested with a public image on an external server. Open an image in the full image viewer, copy the url into a tweet.
Note: Since this was merged into metadata in 2015 there's been a big push towards decoupled web-apps, in particular iviewer. This potentially means this PR is the start of a new omero.web config API which web apps would be expected to use if they want to provide twitter and opengraph/facebook metadata.
Testing instructions
Setup OMERO.web with a public user, and add the following configuration (the name of the server
"omero"must match the key inomero.web.sharing.*, multiple sets of server configs are supported):Open the full image viewer (
webclient/img_detail/) for an image, and view-source. You should see the following meta tags:These tags are automatically parsed by applications such as slack or twitter to generate a preview, but the URL must be publicly accessible to test this. You can use something like the free version of
ngrokif you want to test this locally e.g.ngrok http 4080.An example docker-compose file is in https://gitlab.com/openmicroscopy/incubator/docker-dev-compose/tree/0677a98ebf75a121c417e2b45478daaefa1d2e27/omero-server-public