knowing Ke$ha and her sense of humor, it was probably an ironic joke and/or Chris Brown shade, since she's voiced her intolerance for what he did to Rihanna.
It could be fake in its entirety as well, and knowing a big name celebrity like her, she probably wouldn't pee in public in fear of paparazzi hoarding her/people seeing her/pictures being taken/etc.
TBH it's probably a picture of her in some dustbowl city with no one around, or as most have suggested, an alleyway.
Even if it is real, ya'll can't act like you've never had to take a piss really bad and haven't had to stop on the side of the road or go behind a public building, let's be honest.
All these people saying they wouldn't do the same thing, what do you expect her to do? piss herself? . She probably decided to tweet about it for easy promo and looking at this thread and the internet it has worked . Ke$ha aint stupid