Updated for cordova 3.2 and uses simple facebook library