code for clean up twitter publisher