@comicart,
Look around the last insert in the details.php file, that is where the graphic is added.
The code looks correct and as long as the user allows the avatar and they have a facebook account it should display, otherwise it will not.
My site does not show the symptoms that yours has...
Can you zip and attach your details.php file for me to look at?