some refactoring around facebook service