Update src/plugins/facebook.js

Added minimal documentation, fixed minor bugs