Improve error handling for Facebook