Use this code:
global $CPG_PHP_SELF, $LINEBREAK, $CURRENT_PIC_DATA;
if ($CPG_PHP_SELF == 'displayimage.php') {
$superCage = Inspekt::makeSuperCage();
$meta .= '<meta property="og:url" content="' . $CONFIG['ecards_more_pic_target'] . 'displayimage.php?pid=' . $superCage->get->getInt('pid') . '" />' . $LINEBREAK;
$meta .= '<meta property="og:image" content="' . $CONFIG['ecards_more_pic_target'] . $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'] . '" />';
}
Hello,
I used this code and it works like a charm for which I thank you but now it seems that it doesn't quite fit my requirements.
Sharing services like addthis and also the generic facebook share use these meta tags and don't display any image when they are missing.
So could it be possible also to display the meta tags for og:url and og:image in the thumbnails.php also?
This can be debugged here for instance -
https://developers.facebook.com/tools/debug/og/object/ to see what will be the share result and if you share from thumbnails.php there is no image.
For the test I share for example Last Additions from
http://www.greatmusclebodies.com/thumbnails.php?album=lastup&cat=0 and I want the og:url tag to be in there with a og:image tag for an image (it doesn't matter which image as long as there is one).
I hope you understand what I mean.
Is it possible to also to display the