
By soulsesa on
Hi everybody I am using drupal 8.7.7 with 2 language installed (English and french).
I am using AddToAny to share content on social network.
I installed also metags module.
But when I share and article (node) on facebook the image is missing.
someone can help me to fix this?
thank you
Comments
What does the debugger tell you?
https://developers.facebook.com/tools/debug/og/object
debugger tell me that he can
debugger tell me that he can't examine the url
https://www.facebook.com/zoodomail
Debugger says
When I use the sharing debugger to examine one of your story pages, here is what I see:
The provided 'og:image' properties are not yet available because new images are processed asynchronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags. Learn More
https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fwww.zoodomail.com%2Ffr%2Fsecurite%2Finsecurite-ouagadougou-un-reseau-de-malfrats-demante
Facebook's documentation says:
You can fix this for an individual item by using the debugger (which forces an image fetch) but of course that's not practical.
Or you can add use
og:image:width
andog:image:height
Open Graph tags.I don't know whether Metatag + Token make dimension tokens available to you in Drupal 8, as I have not had to wrestle with this particular problem.
If they are not available, a workaround would be to set up an image style of known dimensions to be used for social sharing. To normalize size and shape you might need to composite the image onto a neutral background. Doing this will have a positive side effect: you won't get into a situation where Facebook mangles the cropping of a vertical photo.