Spark: Refactor facebook id and request handling.