samwilson / twyne

A web-based journal for writing and photography.
GNU General Public License v3.0
8 stars 1 forks source link

OpenGraph Metadata #140

Open revi opened 2 years ago

revi commented 2 years ago

When POSSE-ing my posts to FB (or for that matter, Twitter as well) - when I share post-only pages, following preview shows up - which is not that bad because you're supposed to browse to the URL to read it...

image

But when sharing images (example here), it's pretty desirable that the image shows up as a preview (so I can avoid providing more metadata than I need) - but it doesn't provide one (FB constructs one on the go but Twitter shows nothing). While FB can do their own inferences, Twitter doesn't do that - and I share posts in both places, so if something needs to done to make it more... colorful, it's going to be OpenGraph because when Twitter cannot find their own Twitter Cards specs, they'll fall back to OpenGraph so there's just one tag to implement.

Image From...
image Facebook
image Twitter
samwilson commented 2 years ago

I've added og:site_name, og:type (which is always article; this could probably be refined in some way), og:title, og:url, og:image (this probably needs extra tags, about type and size etc.), and multiple og:tag.