Commits

Steve Losh committed e60341c

Get the API working.

  • Participants
  • Parent commits fb77891

Comments (0)

Files changed (1)

File grabtweets.py

 #!/usr/bin/env python
 
+import os, sys
+
+BASE_DIR = os.path.abspath(os.path.dirname(__file__))
+PYTHON_TWITTER_PATH = os.path.join(BASE_DIR, 'python_twitter')
+sys.path.append(PYTHON_TWITTER_PATH)
+
+import json
+from python_twitter import twitter
+
+api = twitter.Api()
+statuses = api.GetUserTimeline('stevelosh')
+
+tweets = [s.text for s in statuses]
+print json.dump(tweets)