Android Facebook 3 SDK, should you upgrade?
Facebook released version 3.0 of their SDK a while back, but the majority of apps out there will be using the Facebook 2.0 SDK.
Facebook upon release of the SDK advised customers to upgrade. However, this is not a small task as the entirety of the previous SDK was deprecated.
So this leaves most of you out there with a big problem for no gain right?
So you’re worried about future compatibility? Well, just throw the library into your project, TEST and your done.
Facebook 3.0 SDK actually re-implemented all of the deprecated calls of the Facebook 2.0 SDK using Facebook 3.0 calls. So by importing the new library, your code is “using Facebook 3.0 calls”.
I’ve found that all expected behavior is replicated fine. However, if you were misusing the Facebook 2 SDK, you might not be left off the hook when you use the Facebook 3 re-implementation.
Previously you could just pass a token into the Facebook object and you’d be done.
Facebook facebook = new Facebook(app_id);
And then you could make your calls. This behavior is undocumented and will work on Facebook 2 SDK but will fail with Facebook 3. So make sure you set the expiry!
So the Facebook 3 SDK is not a perfect drop in and forget it upgrade. It is crucial to retest every facebook interaction your app uses, especially those surrounding the setting up on the facebook object. The above might not be the only behavior that isn’t replicated, but it was the only one that I found when updating a large client project recently.