Here's a quick clip of all the world leaders Obama was photographed with at the most recent meeting of the United Nations. He's clearly had some practice on that smile.
It would appear as though everyone just lined up and then stepped in when it was their turn with Obama. Everyone except for Italy:
Michelle Obama: "Nice to meet you."
Italian P.M.: "Come-a close-a. I'm-a gonna touch-a yo face."
Barack Obama: *Pimp stare*