Any business needs to mitigate risks, and I'm not trying to downplay that. You can see this with Zynga and Facebook, for example. At the same time, you have to remember that the platform is also a business, too. Platforms don't have a business without customers to build on top of them.
http://en.wikipedia.org/wiki/Netscape#History
Microsoft's entire corporate history is full of incidents like Twitter's new policies. Building on top of browsers sounds safer than the Microsoft/Netscape scenario until you consider the possibility that the browser vendor might launch a competitor and use the browser to promote it (e.g. MPEG LA vs. Google/WebM).
Building on top of anything is risky unless the platform (whatever that be - OS, Facebook, Twitter) provider gives you some guarantees (and you have enough trust in them that they will stick to those guarantees).
If you build your app on top of someone's service and the terms of use say "we reserve the right to change anything", it's like loading a shotgun, giving it to the service provider, and hoping they'll be nice to you.
If you don't/can't accept that risk, don't build on top of them.