Created
June 12, 2017 08:55
-
-
Save AsciencioAlex/5f5eeab00c79032aee981f36f656716a to your computer and use it in GitHub Desktop.
simple codes to retrieve your tweets. Written in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 | |
import json | |
screen_name = "KenyaGeek " | |
screen = raw_input("Which tweet do you want to search?") | |
url = "http://api.twitter.com/1/statuses/kenyageek.json?screeen_name" + screen_name | |
data = json.load(urllib2.urlopen(url)) | |
print len(data), "tweets" | |
for tweet in data: | |
print tweet['text'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment