5. The opportunity
Content Interpreting user information (for
Filtering valuable data data signals
Creating rich(real-time) to convey
Surfacingreal-time experiences (for the
Helping users publish the right content
into actionable information for
relevant, meaningful conversations
ecosystem) in exchange for greater to
enterprise users) to facilitate target
at the right time to optimize resonance.
reach and growth.
engagement and manage reputation.
6. Every tweet that comes from quora to
twitter results in 30 clicks per tweet.
⇢ Charlie Cheever, Co-Founder
8. Twitter is just three things:
Tweets,relationships between those three
And the users, anD Timelines
9. What is the @TwitterAPI?
⇢provides Twitter functionality
⇢read / write / read DM (Tweet, Follow, DM, etc.)
⇢real-time search index
⇢HTTP long poll connection
⇢Tweets in real-time
11. Three main objects
Status Objects → the Tweet (text, author, and metadata)
User objects → username, screen name, avatar
Timelines → orderings of Tweets
12. The tweet's unique ID. These Text of the tweet.
IDs are roughly sorted & Consecutive duplicate tweets
developers should treat them are rejected. 140 character
as opaque (http://bit.ly/dCkppc). max (http://bit.ly/4ud3he).
"An early look at Annotations:
"created_at"=>"Fri Apr 16 17:55:46 +0000 2010", creation
"in_reply_to_user_id"=>nil, The ID of an existing tweet that date.
"in_reply_to_screen_name"=>nil, this tweet is in reply to. Won't
"in_reply_to_status_id"=>nil be set unless the author of the
The screen name &
user ID of replied to referenced tweet is mentioned.
"truncated"=>false, Truncated to 140
characters. Only tweet author.
possible from SMS. The author's
user name. The author's
The author's biography.
bedded object can get out of sync.
"The Real Twitter API. I tweet about API changes, service issues and
The author of the tweet. This
happily answer questions about Twitter and our API. Don't get an answer? It's on my website.",
"url"=>"http://apiwiki.twitter.com", The author's
"location"=>"San Francisco, CA", URL.
The author's "location". This is a free-form text ﬁeld, and
"profile_background_color"=>"c1dfee", there are no guarantees on whether it can be geocoded.
for the author. Colors
are encoded in hex
"profile_sidebar_border_color"=>"87bc44", The creation date
user → a the Tweets a given user has authored
home → the main timeline you would see in a client
Mentions → all the Tweets that @mention a user
14. Causing change
Tweeting → a POST to status/update
Following → a POST to friendships/create
DM-ing → a POST to direct_messages/new
⇢ signature based requests
⇢ user driven access to the API
⇢ client differentiated access to the API
Applications don’t have passwords
⇢ applications store tokens for their users
⇢ users can change passwords, but tokens still work
⇢ coming soon!
350 OAuth calls / user / hour / IP
⇢ authenticated calls goes against calling user
⇢ unauthenticated calls goes against calling IP
⇢ limits on number of Tweets / DMs sent
⇢ limits on number of follows / unfollows a day
⇢ can’t send “duplicate” tweets
17. Streaming API
⇢get pushed a tweet, in real-time, that matches your predicate
⇢“push” version of search
User streams / Site streams
⇢re-create the client experience using streams
⇢great for “client” experiences
19. Streaming API’s Sample hose
⇢uses basic authentication
⇢one connection per username
20. Streaming API’s Track and follow
⇢watch a particular keyword
⇢up to 200 can be sent as CSV with track parameter
⇢get all the tweets (RTs, etc.) from a particular user
⇢up to 400 can be issued as CSV with follow parameter
21. Search API
Real-time search index
⇢Tweets indexed in <10 seconds
⇢1.5 billion requests a day
⇢index goes back 7-10 days depending on traffic
⇢contains the best quality Tweets
22. Querying the Search API
⇢ rate-limited by IP address
⇢ just put your query in the q parameter
⇢ use from to restrict to a particular username
⇢ OR to combine queries (q=techcrunch+OR+disrupt)
⇢ - to negate (q=techcrunch+-from=%3Araffi)
23. Tools of the Trade
⇢ documentation central
⇢ create and register new applications
⇢ OAuth enabled version of curl
⇢ allows you to manually test authenticated and unauthenticated REST
Twitter for Mac
⇢ built in “developer console”