Added comments to function in facebook.js