We need an API to interact with Facebook, so that other tools can shield us from it and help us migrate away.
Facebook will never build this API, but perhaps someone can use DOM traversing as the underlying mechanism for an open source service that provides the API.