Why did MySpace fail? Users are known to be sticky - they tend to stay with the same newspaper, brand of chocolate, chewing gum, household cleaning products and so on. But they are only sticky up to a point. If something is better by a sufficiently significant margin, then they will switch (or some will). You can keep those customers just by just matching your competitor's improvements. For many things, the pace of change is reasonably slow. Also, many people just like that specific taste (even if they don't think it tastes as nice - like Coke and New Coke). There is some change (e.g. sugar-free gum), but it's easy for the leaders to keep pace. Perhaps in some cases, the scope for possible improvement is less than the margin needed for users to switch - so you ever fail.
MySpace had that huge advantage of many sticky users, but they stopped improving it, and a competitor (Facebook) made an improved experience.
Twitter is safe for as long as there isn't a sufficiently better competitor - "better" being in terms of the benefit to users, not any engineering quality in itself.
MySpace grew from music. Every single band was MySpace—all of them. This is what they leveraged to go from Friendster-level early adopter popularity, to mainstream youth popularity. This was huge, but they never got past this because MySpace always felt like an Internet underbelly sight. For the same reason that 50 years ago, grownups did not spend hours gabbing away on the telephone like teenagers, MySpace could never make inroads into the 25+ market segments.
Facebook rolled through phase 1 by being exclusive, then phase 2 by first saturating college students, then they exploded beyond what any social network had ever known by offering a clean, curated and controllable experience that steadily roped in older people by being the place to stay in touch with younger friends and family.
I always laugh when people trot out MySpace as a cautionary tale for Facebook, because it's irrelevant. MySpace was the 500lb gorilla in 2004, but Facebook is the only 5000lb gorilla that ever existed. Whatever bring them down won't be for the same reasons that MySpace failed.
People joined Facebook because they could connect to all their old schoolmates on Facebook. And this was because they started out as a school network. Myspace would have failed even if they kept improving it, if that one feature was missing.