Ex-COO Amit Kapur joined MySpace when it was just a startup, stayed until after it was bought by News Corp for $580 million in 2005, then moved on.

Since 2009, he's worked on his new startup, Gravity. Gravity helps websites like the Wall Street Journal match content with visitor's interest.

Kapur understands the threats to Facebook as it goes public. He talked with Business Insider about the lessons he learned from MySpace and shared this advice for Facebook:

No. 1: "Don’t prioritize revenue over user experience. This will ultimately put the company on the wrong path," he says. "Your company's vision needs a longer horizon than 90 days out."

This was something that was "constantly frustrating to me" after MySpace was acquired, he says. At MySpace "deadlines would be set and projects would be pushed around quarterly earnings and phone calls."

No. 2: Don't limit conversations to friends. "A social network that lasts is built around utility," he says meaning it becomes a core part of how people express themselves. "With MySpace we had a really great communications platform but we weren't entrenched in how people interacted in their everyday lives."

Although people put a lot of time and energy into their MySpace pages, in the end, MySpace didn't "keep up and innovate with alternatives out there," he says.

While Facebook let's people talk to their friends, it doesn't let people tap into their "inner celebrity" and express themselves to the bigger world. Because Facebook posts are only seen by friends, people have to go to sites like Tumblr, Twitter and Pinterest to fill that need.

No 3. Don't forget what people really love to do: SHARE PHOTOS. The Instagram purchase shows that Facebook knows this. But Facebook isn't going to be able to buy every new upstart that does great photo sharing. It will have to come up with ways to always make Facebook's own photo sharing better.

He also tossed in some advice for Google+. In a nutshell: Stop chasing Facebook. "How are you going to compete head-to-head with Facebook doing exactly what Facebook does so well?"

He suggests that Google tries to do what Facebook can't. It should encourage people to create a "Google identity" that helps them find the best content across all of Google's services: the best Google+ people to follow, the best YouTubevideos, the best news stories and so on.

Correction: This story originally named the New York Times as a customer of Gravity when the correct customer is the Wall Street Journal. We apologize for the error.