Facebook CEO Mark Zuckerberg has some advice for Twitter on going public: there's no need to stay private for as long as Facebook did.

Facebook was one of the most highly anticipated tech IPOs of the past decade, but it was by no means as successful as the company would have hoped. It was marred with technical glitches and uncertainty about the future of the company's business. A little more than a year ago, the company didn't have a mobile advertising business even though the majority of its users were accessing Facebook from mobile devices.

"I'm the person you want to ask last on how to make a smooth IPO," Zuckerberg said on stage at the TechCrunch Disrupt conference in San Francisco when asked about what kind of advice he would give to Twitter going public.

Still, since going public Facebook has basically built a mobile advertising business from scratch and the stock today even reached a record high, well above $45 — and higher than the price at which it went public after falling as low as around $19. And with Twitter's IPO on the horizon as it staffs up and finds ways to generate revenue with mobile advertising, Zuckerberg is probably one of the most qualified to offer advice.

Here's what he at the conference:

I don't think it's that bad. I was really disheartened by the fact that people would leave the company and people would get really demoralized, but people were really focused on the mission. the process of leading up to going public you have to know everything about your company. The work that [CFO David ] Ebersman and crew to get us ready to go public really took us to the next level, we run our company a lot better. I was too afraid of going public, I don't think it's that necessary [to stay private for a long time]. Sometimes it might take the market a little while to catch up.

As long as Twitter — this goes for all these private companies — as long as they focus on what they're doing [going public is] wonderful.

Matthew Lynley is a business reporter for BuzzFeed News in San Francisco. Lynley reports on Silicon Valley and the tech industry.