Refactored tweeting to work with iPhone.