When working with Facebook, ALWAYS ALWAYS check the URL of your website using the Facebook debugger .
It seems that the problem is that Facebook was not able to play the image in a weird way, so you will need to add a meta tag so that Facebook can find out the desired image for the prvded URL.
Ex: <meta property="og:image" content="YOUR_IMAGE_PATH"/>
Update 1:
To change the meta tag value when changing the gallery image, you can use the following code:
$("meta[property=og\\:image]").attr("content", YOUR_IMAGE_PATH);
note that we needed to avoid the character :as indicated in the documentation
Update 2:
you will need to modify these functions to make it work:
$pp_gallery.find('.pp_arrow_next').click(function(){
$.prettyPhoto.changeGalleryPage('next');
$("meta[property=og\\:image]").attr("content", YOUR_IMAGE_PATH);
$.prettyPhoto.stopSlideshow();
return false;
});
$pp_gallery.find('.pp_arrow_previous').click(function(){
$.prettyPhoto.changeGalleryPage('previous');
$("meta[property=og\\:image]").attr("content", YOUR_IMAGE_PATH);
$.prettyPhoto.stopSlideshow();
return false;
});
source
share