refactoring twitter share