I don't think Facebook is going anywhere just yet. The mobile platform is the future & Facebook just happens to be the among the most popular social networks. Facebook must simply ensure that the smartphone market is adequately served. There are rumors of a Facebook phone, but I don't think that would be the right way to go unless they intend to use a well established operating system such as Android as the base to build upon. The existence of such a rumor itself provides a hint that Facebook realizes the significance of the mobile market.
A better idea for now is to work with smartphone OS manufacturers for Facebook integration. The objective of smartphone integration is to provide its users with a seamless experience on the mobile platform. Currently, the Facebook applications on the 3 major smartphone operating systems aren't that great; they are buggy, slow, & lacking features available on the desktop website. The provision of new features such as voice & video call via mobile Facebook would be a good idea. The introduction of such features provides competitive advantage, & concomitantly revives the interest of users in social networking while managing to demonstrate its potential on the mobile platform. Of course those features must be easily accessible for consumers to use & benefit from. In the end though, all companies have to change & adapt to survive, Facebook is only in danger if it resists change.