Today I successfully added support to Bamboo for Facebook’s nefarious new permissions model. This means that, for the very first time, iPhone application developers have real SDK support for Facebook’s new Graph API, without writing very low-level networking code and handling extremely confusing authorization and permissions.
Facebook has been threatening to shut down data access for all apps that do not migrate over to using the new model for some time now. The most recent deadline was June 1, and it has just moved back to June 30.
If your iPhone app publishes to the user’s stream, as is the case for 98% of iPhone apps, your app will break. You need to do something about it NOW, so that you are ready by June 30. And I am here to help you with that.
Enter Bamboo, a Facebook Graph API iPhone SDK.
First, some Facebook permissions details
Facebook’s fundamental permission concept has changed from a simple yes/no, either your app had permission to do everything or nothing, to a much more granular set of very specific abilities. There are currently 5 “publishing” (write) permission types, and a whopping 45 “data” permission types, broken down into personal data (25 types), and friends data (20 types). You can see the full list here.
For iPhone app developers who interface with Facebook, this means that if you do anything besides read the most basic of public data from a user’s profile, you must update your app with support for the new extended permissions.
So, how can Bamboo help me?
In one succinct line: Bamboo aims to meet all your Facebook needs as an iPhone application developer.
Bamboo is an objective-c implementation of the Facebook Graph API, including support for both the new oAuth authorization, and the new extended permissions model. For integration instructions and more technical details, please see the Bamboo github page.
For your convenience, here is a simple example of client code using Bamboo:
[[FacebookProxy instance] loginAndAuthorizeWithTarget:self callback:@selector(finishedAuthorizing)]; GraphAPI* graph = [[FacebookProxy instance] newGraph]; GraphObject* me = [graph getObject:@"me"]; NSString* myName = me.name; UIImage* myProfileImage = [me largePicture]; NSArray* thingsILike = [graph getConnections:@"likes" forObject:me.objectID]; // hello world post - update status message to my feed/wall NSDictionary* args = [NSDictionary dictionaryWithObjectsAndKeys: @"Hello World, from bamboo!", @"message", nil]; [self._graph putToObject:me.objectID connectionType:@"feed" args:args]; // comment on a post NSDictionary* args = [NSDictionary dictionaryWithObjectsAndKeys: @"Bamboo comment test", @"message", nil]; GraphObject* post_result = [self._graph putToObject:@"post_id" connectionType:@"comments" args:args]; // add a like connection from me to you [self._graph likeObject:@"your_id"]
Bamboo is designed to make the transition from using Facebook Connect to using Bamboo as simple, straightforward, and easy as possible. I have reused the login mechanism of Facebook Connect, and reused the same UI look and feel for the new extended permissions dialog, so your users will feel right at home with the new flow. They may not even notice that anything has changed.
The underlying systems are extremely complex, so it’s not possible to hide all of it, but I constantly strive to make the SDK interface as easy to use as possible, and I actively support the library…so if you need something, I’m here to take care of you.
While Bamboo is far from being finished, I hope that you will consider it to service your iPhone Facebook needs. One day, someone like Apple or Facebook may publish an official SDK that makes this project obsolete…but given Facebook’s negligent track record with FBConnect, I’m not holding my breath. And until that day comes, right now, Bamboo is your best option.
Honestly, it’s pretty much your only option.