fixing bugs in publish tweet account handler, improving it and add tests