optimize getSocialMedia