C4LN 2012: Intro to the Twitter API
From Code4Lib
Revision as of 11:58, 24 May 2012 by Shadowspar (Talk | contribs)
Presenter: Rick Scott - @shadowspar
Contents
API Overview
- https://dev.twitter.com/ is API central.
- other useful things linked therefrom: API Status, API Known Issues, blog & discussion
- https://dev.twitter.com/docs is the main documentation area
- you'll find yourself spending a lot of time here =)
Parts
The twitter API breaks down into three main areas
- the REST API
- query→response based access
- this is what you're most likely to use
- the Streaming API
- aka drinking from the firehose =)
- push-based communication w/ v.high ratelimit
- the Search API
- just like it says on the tin
- also trending topics
Find your library
https://dev.twitter.com/docs/twitter-libraries
- Perl: Net::Twitter
- Python: tweepy and many others
- Ruby: twitter rubygem and others
Creating a new app
- https://dev.twitter.com/apps/new
- sign in with your twitter account
- https://dev.twitter.com/terms/api-terms
- https://support.twitter.com/articles/76915 - automation rules and best practices
Rate limits
Rules of Conduct
Repeated tweets
General TOS
Example
http://twitter.com/inetkami https://github.com/rickscott/inetkami
Other Miscellany
- t, a Ruby command-line interface to the Twitter API