updated for Twitter API v1.1

Twitter now supports on JSON. Updated code to support JSON alone and support new version.