The relationship between Barack Obama and Mark Zuckerberg hasn't always been smooth. But you'd never know it from the way the president and the Facebook CEO greeted each other Friday at Stanford University.
The leader of the free world and the man trying to connect it shared a hug -- OK, an awkward bro hug -- as they introduced three entrepreneurs to a panel discussion at the close of the 7th Global Entrepreneurship Summit.
"I could not wear a T-shirt like Mark," the president said, referencing Zuckerberg's trademark casual style.
"Soon," Zuck responded, referring to the approaching end of Obama's term.
The light repartee, which prompted chuckles in the packed auditorium, came as the Obama administration pushes entrepreneurship as an engine of job growth and equality. Throughout the three-day conference, which brought together more than 300 investors and over 700 businesspeople, his administration rolled out initiatives aimed at bolstering startups and spurring diversity in tech.
Earlier in the week, the administration unveiled a pledge by high-profile tech companies, including Airbnb and Lyft, to improve the diversity of their staff. The administration also expanded a program for sharing government research data with entrepreneurs and streamlining rules for starting new companies.
Obama referenced the diversity initiative, called the Tech Inclusion Pledge, in opening remarks, saying it would help the industry, which is predominately white and male, look more like the country.
"We're very happy for the commitments [the companies] made," he said. "So give them a round of applause."
Zuckerberg, who sparred with the president over online surveillance in 2014, shared his own experience creating Facebook with the younger entrepreneurs. The social network, which grew out of his college dorm room, now has 1.65 billion active users each month.
"To me entrepreneurship is about creating change, not creating companies," he said. He added that he "cared deeply about giving everyone a voice."
On the panel was Egyptian entrepreneur Mai Medhat, CEO and co-founder of Eventtus, an app for event organizers. When the issue of connectivity was raised, she talked about Facebook's role as a communications tool during the Egyptian revolution.
"We created a revolution out of Facebook."
Earlier in the conference, the cast of HBO's "Silicon Valley" entertained the audience, focusing on a young boy who had written four apps, including three designed to help people avoid littering.
T.J. Miller, one of the stars, admitted he had been "intimidated by an 11-year-old."
Obama said he had been in touch with UK Prime Minister David Cameron and German Chancellor Angela Merkel to discuss the British vote yesterday to leave the European Union. He said he was confident the British exit, known as Brexit, would be handled in an orderly manner.
Obama and Zuck first connected in 2008, during the presidential campaign. At the time, Obama was breaking ground in leveraging the social network to attract potential voters and donations. Facebook co-founder Chris Hughes, then 24 years old, joined Obama's election efforts and was credited with mobilizing thousands of supporters.
Obama referenced the 2008 election and his campaign's social media strategy, saying he had to let a team of young people take charge of a medium he didn't understand.
"A bunch of 20 year olds came to me and said, "There's this new thing called MySpace," the president said.
"Ouch," Zuck responded at the mention of Facebook's early competition.
CNET's Samantha Rhodes contributed to this story.