When I paste a link to an Item/show page to Facebook it doesn’t show the Image but shows the page header. I’ve tried rescraping the page in the Facebook debugger and although it then shows the correct image in the debugger the FB link still doesn’t. And anyway, doing this with individual items is not practical.
The FB debugger says ‘og.image’ should be specified - is there a way to do this in Omeka? Maybe a plugin to add the og info automatically?
But it threw up an extra copy of the image at the top of the page, followed by " /> is there something wrong with that code that means the parser is misinterpreting it?
Thanks again John - a very helpful friend managed to get it working with this code (but I will pass your suggestion on to him (although he’s probably watching anyway):
Code snippet to resolve issues with Facebook not displaying images via Omeka Social Bookmarking plugin Add to an Omeka Classic Theme’s /common/header.php to output …
<?php if ($bodyclass=='items show'):?> #bodyclass may vary in different themes 'item show' might be used
<?php $item = get_current_record('item')?>
<?php $myimage = metadata($item->getFile(), 'thumbnail_uri'); ?>
<meta property="og:image" content="<?php echo $myimage ?>">
<?php endif; ?>