US President Barack Obama faces a debt crisis, angry Republicans, and a hard fight to reelection -- but at least, he noted Wednesday, he got Facebook's youthful founder to dress up.

"My name is , and I'm the guy who got Mark to wear a jacket and tie," the quipped about Facebook creator Mark Zuckerberg to open a campaign-style event at the social media titan's headquarters here.

"Thank you," Obama said with a chuckle as Facebook employees rewarded him with a chorus of laughter. "I'm very proud of that."

Zuckerberg, 26, had swapped his trademark hooded sweatshirt for a jacket, shirt and tie -- though his top button wasn't closed -- for the president's unprecedented appearance.

Obama's visit here aimed to recapture twin engines of his historic 2008 run for the , when his campaign harnessed the power of social media and young voter enthusiasm, ahead of his 2012 reelection battle.

The president notably aimed to promote his vision for reining in galloping US deficit and debt, including raising taxes on the richest Americans -- including himself and Zuckerberg.

"I'm cool with that," the founder said.

"I know you are," replied Obama.