Facebook has just announced the Facebook Technology Partners Program and has named Thuzi as one of the charter members. Thuzi was recognized due to our extensive experience and contributions to the community of developers building Facebook applications in JavaScript. Information about the Facebook Technology Partners can be found here: Facebook Technology Partners – Facebook Developers
Thuzi’s contribution to the community includes two Facebook SDK’s; one for Node.js and one for WinJS. Both codebases are forks of the original Facebook Javascript SDK, with adaptation to run in Node.js and also the new Microsoft Windows 8 WinJS environment.
Here at Thuzi we love JavaScript and use it to create Facebook applications of all kinds including Web apps (Canvas, Tab and Microsite) and Native apps (iPhone, Android, Windows 8). Recently we have embraced Node.js in all its glory. Since we made this decision, we have experienced faster development cycles than we ever thought possible. When we embarked on this path, we naturally scanned the community for Node.js Facebook SDK’s and found nothing that was fully baked. This lead us to a plan to fork the Facebook JavaScript SDK and change a few things to make it work best with Node.js without impacting the SDK. The huge advantage here is that we get to re-purpose the code we write on the client side for server side applications as well. This strategy has provided enormous efficiency benefits, there was nothing new to learn, and all the JavaScript examples you can find online just worked without modification!
Here is simple example using Facebook Node SDK.
npm install fb
var FB = require('fb');
FB.api('4', function(res) {
console.log(res);
});
In addition to the compatibility with the client side Facebook JavaScript SDK, we have also modified some of the internal code and added helper methods that strengthened the server side. For instance, oauth requests, such as exchanging code for access token, extending expiry time for access token, etc. only work in the Facebook Node SDK.
In order to avoid callback hell, we have also added a special method called napi which follows the callback pattern found in most of the node libraries. Here is an example using Step.js – an async control flow library for Node.
var FB = require('fb'),
Step = require('step');
Step(
function getUser() {
FB.napi('4', this);
},
function processResult(err, res) {
if(err) throw err;
console.log(res);
}
);
You can find the source code of Facebook Node SDK along with the Scrumptious sample here: https://github.com/Thuzi/facebook-node-sdk
Let us know what you think and if you need some help building the next cool app for Facebook yourselves or your client, drop us a line and we will see what we can do to help you succeed!
813-704-0025
info@thuzi.com








What a week for Facebook! Starting with the
Today,