President Obama took a little dig at Mark Zuckerberg on Friday.

During a panel discussion with the Facebook founder and three other entrepreneurs, the president recounted how “a bunch of 20-year-olds” helped adapt his campaign to new technologies.

He said they told him, “There’s this new thing called MySpace,” which caused laughter from the audience and Zuckerberg.

“Ouch,” Zuckerberg said.

Their exchange took place during the Global Entrepreneurship Summit, an annual conference hosted by the White House to bring together entrepreneurs, lawmakers and investors from around the world.

Obama was making a point about how hard it can be for governments to change, as there is often be a top-down approach to decision making.

If he would have tried to maintain control of his campaign, he would have gone with pamphlets, instead of a digital strategy.

“There’s a cultural shift that’s sometimes difficult,” said Obama.

Also on stage with the president and Zuckerberg were Mai Medhat, Jean Bosco Nzeyimana and Mariana Costa Checa.

Medhat, who’s from Egypt, is the CEO and cofounder of an event planning and ticket platform, Eventtus. Nzeyimana is the founder and owner of HABONA, which makes environmentally friendly fuel from waste in Rwanda.

Costa Checa, from Peru, leads Laboratoria, a digital skills training and job placement program for disadvantaged women.

President Obama asked the panelists about the challenges they’ve faced and what big companies and governments can do to help.

With 20 countries represented at the conference, he said it was an opportunity for everyone to learn from one another so that it’s easier for young entrepreneurs to launch and run their companies.

But the tone of the talk was set by his keynote, which focused on the symbolism of the U.K. leaving the European Union.

“The world has shrunk. It is interconnected. All of you represent that interconnection, [which] promises to bring extraordinary benefits, but it also has challenges, and it also evokes concerns and fears,” he told the crowd.

Through their efforts, entrepreneurs have the power to shape businesses, create jobs and build new products.

“It’s never been more important,” he said. But entrepreneurs need to make sure that those opportunities extend to as many people as possible, the president added.

Zuckerberg weighed in later with his own definition of entrepreneurship — one that he’s promoted in the past.

“Entrepreneurship is about creating change, not just creating companies,” said Zuckerberg.

He said that when people doubted his idea of starting a social network, he kept going because he fundamentally cared about what he was doing: connecting people online.

“You only do it if you care.”