They did and then spent $5B purchasing Instagram and Whatsapp to recover.
Instagram was moments before ipo.
Also the FB html5 play at the time was a decent bridge to the app play which did of course explode growth.
So let’s be fair they didn’t fail but they acquired to grow even more.