Python code for fetching the last 3240 tweets given a user id.
Can also be changed to user name changing user_id to user_name on line 26 and also function argument to user_name.
The scraped tweets are written onto a CSV file.
To run the program, get your credentials from https://dev.twitter.com/ and fill them up on lines 8 - 11.