Facebook authentication code cleanup

Refactored Facebook authentication logic to improve code readability and maintainability. The changes include extracting the API version to a class variable, reorganizing error handling with early returns to reduce nesting, improving code formatting, and updating URL construction to use the centralized API version variable.