pop up for failing in posting tweet and some code refactorings