According to a recent patent granted to Facebook, When a user enters a emoji in a comment or message thread, Facebook will identify an image of the user that corresponds to the selected emoji.Such as an image of the person smiling in exchange for a smiley emoticon. The system will then replace your generic emoji with the small photo of you.
Source