Even if Facebook saw a decline starting today given how entrenched it is among vast swathes of humanity figure it'd take a good decade to be where MySpace is now.
On Microsoft, they are in no danger as no competitor is even close right now and don't see that changing in OS scene anytime soon.