Force.com for Facebook toolkit gets an update, and goes mobile.

The Force.com for Facebook toolkit gets and update and goes mobile thanks to community contribution.

Sometimes  (well most of the time), the Force.com community makes my job so much easier! Over the weekend two of our most active members, Jeff Douglas and Mike Leach contributed some amazing code for working with Force.com and Facebook. What's more, mash the two together and you have something really impressive – mobile social apps built on the Force.com platform with complete access to the Facebook social graph!

Here is a highlight of the contributions:

1. Force.com for Facebook toolkit

The initial beta release of the new Force.com for Facebook toolkit only supported reading of the social graph. Jeff added the ability to write posts, comments, likes, notes, and even checkins! I merged his code into the github repository this morning. This completes the beta2.5 release of the toolkit (why beta? see here). I'm actively working on the v3 release too, but more on that later.

 Here is a sample of writing to your wall, and performing a checkin:

private void postToWall() {
Map<String,String> params = new Map<String,String>();
params.put('message','Start using the Force.com toolkit for Facebook now');
params.put('name','Message name here');
params.put('link','http://developer.force.com');
params.put('description','Jeff just added write ability to toolkit. Check it out.');
fp.postToWall(params);
}

private void postCheckin() { Map<String,String> params = new Map<String,String>(); params.put('coordinates','"latitude":"27.2931025","longitude":"-82.5034311"'); params.put('place','145996348751414'); // page id params.put('message','Hey!! I just checked in!'); params.put('tags','qwall'); fp.postCheckin(params); }

2. iOS Mobile Web Framework for Force.com

Mike wrote a great article on some work he and the folks at Facebook have been doing called JAWS (Just A Web Shell). JAWS is a "hybrid" mobile application framework that provides a native iOS application on the mobile desktop that instantiates a web browser to a Force.com web page. While there is certainly a lot of hype around native apps these days, there is huge potential for cross device support for html5 based apps which using some of the popular mobile frameworks like jQuery mobile. If you are interested in using the toolkit, Mike has made it available as a github project.

1+1 = 3

I was never very good at math, but even I can see that with these two contributions, 1+1 really does equal three. I can easily take the Force.com for Facebook toolkit and put together a Visualforce page which has access to the social graph and the information contained within your Salesforce org, then leverage JAWS to make it mobile ready. 

It's always a great feeling to know that at 9:30am on a Monday morning I am ahead of my todo list. I guess that means I can spend a little extra time surfing Facebook 🙂 Thanks Jeff, and Mike!

Leave your comments...

Force.com for Facebook toolkit gets an update, and goes mobile.