Connecting to Twitter & Google+ using Python

Location: D135 Level: Intermediate
Average rating: ***..
(3.40, 5 ratings)

Twitter and Google+ are two of the most highly active and popular social media platforms today. While both provide a nice online user interface, there are times where you wish to create your own application (Web or otherwise) using this data. Interesting examples of such apps include TweetDeck, Klout, and Value often comes in the form of being able to merge and analyze data from multiple sources, and organizing all of that data into useful information. Using Python, you can easily execute searches on both. All you need is a client library (easily found), and you can get going without a lot of effort!

Twython and Tweepy are two examples of Python libraries that connect to Twitter. Google provides it’s own Google APIs Client Library for Python that let you communicate with Google+. We will use these libraries and show you some elementary code that allows you to query both platforms and display the data received in an elementary way. We only have slightly beyond half an hour in this talk, so I’ll expect you attendees to create something a bit more interesting. I’ll just provide your motivation. Of course, it goes without saying that you must abide by both services’ terms, conditions, and policies, but if you’re motivated with turning this data into information, Python will give you a fast path there!

Photo of wesley chun

wesley chun


WESLEY J. CHUN, MSCS, is the author of Prentice Hall’s bestseller, Core Python Programming, its video training course, “Python Fundamentals” (LiveLessons DVD), and co-author of Python Web Development with Django. In addition to being a software architect and Developer Advocate at Google, he runs CyberWeb, a consulting business specializing in Python software engineering and technical training. He has over 25 years of programming, teaching, and writing experience, including more than a decade of Python. While at Yahoo!, he helped create Yahoo! Mail and Yahoo! People Search using Python. He holds degrees in Computer Science, Mathematics, and Music from the University of California.


For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at (707) 827-7065 or

View a complete list of OSCON contacts