How to add Facebook Like Button on preety photo

In this tutorial we learn how to add Facebook Share button on prettyphoto.

1. open your script.js file where you have call the $(‘.prettyPhoto’).prettyPhoto() initialize.

2. Go to onPictureChanged() in the $(‘.prettyPhoto’).prettyPhoto().

3. and add this code.


changepicturecallback: onPictureChanged,

function onPictureChanged() {

var fbDiv = jQuery(‘.facebook’);

jQuery(‘<iframe>’, {

‘scrolling’ : ‘no’,
‘style’:’border=”none”‘ ,
‘height’:’24px’ ,


that is all for now.

thanks for view this post, and also keep comment, its give me energy to write this kind of useful blogs.