Jamie Foxx played a trick on the Secret Service when he was invited to perform for President Barack Obama.

The actor was honoured to be asked to perform for US President Barack Obama at the White House, but didn’t let his nerves hamper his sense of fun. He was amazed to be told his jokes needed to be checked over by the Secret Service before he could use them, so decided to play around a little.

“I got a chance to tell jokes in front of [Obama] and Vice President Biden. The Secret Service asks you to write down all your jokes, you know, but I wrote down fake jokes. ‘You know, a funny thing happened to me on the way here.’ Stuff like that…,” he laughed to GQ.

“They were like, ‘He’s not saying the right jokes!’ As I’m telling my jokes, I’m like, ‘Look at your Secret Service - these are not the jokes I told them.’” Jamie and Channing Tatum appear in White House Down, which is about a Capitol policeman who has to protect the president after the White House is invaded as he is touring it. Jamie drew on Obama when preparing for his role as the president and he has nothing but admiration for what the politician goes through every day.

“I mean me playing the president on screen is nothing, I’m sure, compared to what he’s dealing with in the White House. But I did take things from Obama. We made my character a little more nerdy, a little more cerebral, and stuff like that in order to have the contrast of the two characters. But I wouldn’t want his job,” he explained.