Implement Facebook chat API based on official Facebook sample