SlideShare uma empresa Scribd logo
1 de 43
Baixar para ler offline
Developing with @twitterapi
#hack4health




                              TM
giving a talk about coding for the
giving an @ignite talk at @chirp entitled
@twitterapi over Skype!
"energy / tweet".
#hack4health
about 2 minutes ago via mobile web from Fort Mason, San Francisco
What is                     ?
How to use the Twitter Platform
What is                    ?
‣   REST API
    ‣   provides the “basic”       functionality - tweet, follow, etc.
    ‣   all functions available on your timeline on twitter.com
‣   Search API
    ‣   real-time search index
    ‣   get “top tweets” / relevant search results
‣   Streaming API
    ‣   HTTP long-poll connection
    ‣   tweets come out of the system in real-time
Tools of the trade
‣   dev.twitter.com
    ‣   documentation center
    ‣   API console for quick testing and exploration
‣   curl and a web browser
    ‣   testing unauthenticated endpoints
    ‣   CLI to get a raw dump of the interaction
‣   twurl
    ‣   OAuth-enabled version of curl
Authenticating to
‣   OAuth 1.0a
    ‣   signing “write” requests
    ‣   give     visibility into the stack
‣   Applications don’t have a user’s username / password
    ‣   user can change password at any time
    ‣   user is secure in knowing his/her password not being stored outside
        of
    ‣   user can revoke permissions to app at any time
twurl
‣   http://github.com/marcel/twurl
‣   Command line tool to interact          with using OAuth
‣   Transparently handles OAuth signing against
    ‣   authorize against to get access tokens
    ‣   from there on out, all requests are signed
dev.twitter.com
The developer console
Creating an app
Your own small playground
Anatomy of the
REST API
What if I want to write code?
GETing from the API
Reading, reading, reading
GETing from the API
‣   For most cases, completely wide open
‣   Can do a HTTP connect and a simple GET request
‣   “Protected” information may require authentication (covered later)
    ‣   getting the tweet of a protected user
    ‣   getting the timeline of a user
Status objects
The basis of everything
Getting a status object
‣   Figure out the ID of the status objects
‣   Construct the URL for statuses/show
‣   Grab it!
Taking a look at status 13762161921
‣   Build the API URL
    ‣   http://api.twitter.com/1/statuses/show/
        13762161921.xml
    ‣   http://api.twitter.com/1/statuses/show/
        13762161921.json
‣   If it’s a public status, then just fetch it
    ‣   use a browser!
    ‣   use curl!
Taking a look at status 13762161921
[raffi@tw-mbp13-raffi Desktop]$ curl http://api.twitter.com/1/statuses/show/
13762161921.xml
<?xml version="1.0" encoding="UTF-8"?>
<status>
  <created_at>Tue May 11 01:58:56 +0000 2010</created_at>
  <id>13762161921</id>
  <text>...and another late night</text>
  <source>&lt;a href=&quot;http://mehack.com&quot; rel=&quot;nofollow&quot;&gt;@raffi's
Test App&lt;/a&gt;</source>
  <truncated>false</truncated>
  <in_reply_to_status_id></in_reply_to_status_id>
  <in_reply_to_user_id></in_reply_to_user_id>
  <favorited>false</favorited>
  <in_reply_to_screen_name></in_reply_to_screen_name>
  <user>
    <id>8285392</id>
    <name>raffi</name>
    <screen_name>raffi</screen_name>
    <location>San Francisco, California</location>
    <description>Tinkering, writing, engineering, and breaking things on the
@twitterapi.</description>
    <profile_image_url>http://a1.twimg.com/profile_images/364041028/raffi-headshot-
casual_normal.png</profile_image_url>
    <url>http://www.mehack.com/</url>
Dissecting a status object
                                                             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).
        DEPRECATED




                                 {"id"=>12296272736,
                                  "text"=>
                                  "An early look at Annotations:
                                   http://groups.google.com/group/twitter-api-announce/browse_thread/thread/fa5da2608865453",                      Tweet's
                                  "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 author's




                                                                              The screen name &
                                  "favorited"=>false,
   user ID.




                                                                              user ID of replied to       referenced tweet is mentioned.
                                  "truncated"=>false,      Truncated to 140
                                                           characters. Only      tweet author.
                                  "user"=>
                                                          possible from SMS.                               The author's
                                   {"id"=>6253282,
                                                                                                            user name.                             The author's
                                    "screen_name"=>"twitterapi",
                                                                                       The author's                                                  biography.
                                    "name"=>"Twitter API",
                                                                                      screen name.
 d object can get out of sync.




                                    "description"=>
                                    "The Real Twitter API. I tweet about API changes, service issues and
 uthor 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 field, and
                                    "profile_background_color"=>"c1dfee",           there are no guarantees on whether it can be geocoded.
                                    "profile_background_image_url"=>
                                    "http://a3.twimg.com/profile_background_images/59931895/twitterapi-background-new.png",
                                                                                                                                                Rendering information
                                    "profile_background_tile"=>false,
                                                                                                                                                for the author. Colors
                                    "profile_image_url"=>"http://a3.twimg.com/profile_images/689684365/api_normal.png",
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).
    DEPRECATED




                   {"id"=>12296272736,
                    "text"=>
                    "An early look at Annotations:
                     http://groups.google.com/group/twitter-api-announce/browse_thread/thread/fa5da2608865453",                   Tweet's
                    "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 author's




                                                                The screen name &
                    "favorited"=>false,
  user ID.




                                                                user ID of replied to       referenced tweet is mentioned.
                    "truncated"=>false,      Truncated to 140
                                             characters. Only      tweet author.
                    "user"=>
                                            possible from SMS.                               The author's
                     {"id"=>6253282,
                                                                                              user name.                          The author's
                      "screen_name"=>"twitterapi",
                                                                         The author's                                              biography.
                      "name"=>"Twitter API",
                                                                        screen name.
get out of sync.




                      "description"=>
                      "The Real Twitter API. I tweet about API changes, service issues and
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 field, and
"favorited"=>false,                                                         referenced tweet is mentioned.




  user ID
                                                                                     user ID of replied to




The auth
                                       "truncated"=>false,      Truncated to 140
                                                                 characters. Only       tweet author.
                                       "user"=>
                                                               possible from SMS.                                   The author's
                                        {"id"=>6253282,
                                                                                                                    user name.                                   The author's
                                         "screen_name"=>"twitterapi",
                                                                                              The author's                                                        biography.
                                         "name"=>"Twitter API",
                                                                                             screen name.
embedded object can get out of sync.     "description"=>
                                         "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 field, and
                                         "profile_background_color"=>"c1dfee",             there are no guarantees on whether it can be geocoded.
                                         "profile_background_image_url"=>
                                         "http://a3.twimg.com/profile_background_images/59931895/twitterapi-background-new.png",
                                                                                                                                                             Rendering information
                                         "profile_background_tile"=>false,
                                                                                                                                                             for the author. Colors
                                         "profile_image_url"=>"http://a3.twimg.com/profile_images/689684365/api_normal.png",
                                                                                                                                                              are encoded in hex
                                         "profile_link_color"=>"0000ff",
                                                                                                                                                                  values (RGB).
                                         "profile_sidebar_border_color"=>"87bc44",                 The creation date
                                         "profile_sidebar_fill_color"=>"e0ff92",                    for this account.
                                         "profile_text_color"=>"000000",                                                      Whether this account has
                                         "created_at"=>"Wed May 23 06:01:13 +0000 2007",                                         contributors enabled
                                         "contributors_enabled"=>true,                                                          (http://bit.ly/50npuu).                   Number of
Number of tweets




                                         "favourites_count"=>1,                                                                                                          favorites this
 this user has.




                                         "statuses_count"=>1628,                                                                                    Number of              user has.
                                         "friends_count"=>13,                                                                                     users this user
                                         "time_zone"=>"Pacific Time (US & Canada)",                           The timezone and offset              is following.
                                         "utc_offset"=>-28800,                                               (in seconds) for this user.
                                         "lang"=>"en",                                                                                                            The user's selected
                                         "protected"=>false,                                                                                                           language.
                                         "followers_count"=>100581,
                                         "geo_enabled"=>true,                                                                                        Whether this user is protected
http://bit.ly/4pFY77).




                                         "notifications"=>false,     DEPRECATED
r this user has geo




                                                                                                                                                     or not. If the user is protected,
                                         "following"=>true,          in this context                                        Number of
                                                                                                                                                       then this tweet is not visible
                                         "verified"=>true},                               Whether this user                followers for
                                                                                                                                                            except to "friends".
                                       "contributors"=>[3191321],                       has a verified badge.                 this user.
                                       "geo"=>nil,
                                       "coordinates"=>nil,           DEPRECATED
                                       "place"=>                                                                            The contributors' (if any) user
The fields you really need
‣   id - the unique identifier for the status
‣   text - the content of the status update
‣   created_at - the date the status was created at
‣   user/id - the unique identifier for the status creator
‣   user/screen_name - the name of the status creator
‣   user/profile_image_url - the URL to the creator’s avatar
User objects
The “who”
Getting an user object
‣   You can do this with a screen name or an ID
‣   Construct the URL for users/show
‣   Grab it!
‣   (and, status objects do have embedded users)
Taking a look at @raffi
‣   Build the API URL
    ‣   http://api.twitter.com/1/users/show/raffi.xml
    ‣   http://api.twitter.com/1/users/show/raffi.json
    ‣   http://api.twitter.com/1/users/show.xml?
        user_id=8285392
    ‣   http://api.twitter.com/1/users/show.json?
        user_id=8285392
‣   Just fetch it!
Taking a look at user @raffi
[raffi@tw-mbp13-raffi Desktop]$ curl http://api.twitter.com/1/users/show/raffi.xml
<?xml version="1.0" encoding="UTF-8"?>
<user>
  <id>8285392</id>
  <name>raffi</name>
  <screen_name>raffi</screen_name>
  <location>San Francisco, California</location>
  <description>Tinkering, writing, engineering, and breaking things on the
@twitterapi.</description>
  <profile_image_url>http://a1.twimg.com/profile_images/364041028/raffi-headshot-
casual_normal.png</profile_image_url>
  <url>http://www.mehack.com/</url>
  <protected>false</protected>
  <followers_count>2862</followers_count>
  <profile_background_color>C0DEED</profile_background_color>
  <profile_text_color>333333</profile_text_color>
  <profile_link_color>0084B4</profile_link_color>
  <profile_sidebar_fill_color>DDEEF6</profile_sidebar_fill_color>
  <profile_sidebar_border_color>C0DEED</profile_sidebar_border_color>
  <friends_count>424</friends_count>
  <created_at>Sun Aug 19 14:24:06 +0000 2007</created_at>
  <favourites_count>45</favourites_count>
  <utc_offset>-28800</utc_offset>
  <time_zone>Pacific Time (US &amp; Canada)</time_zone>
The fields you really need
‣   id - the unique identifier for the user
‣   screen_name - the screen name of the user
‣   name - the name the user entered on his/her settings page
‣   profile_image_url - the URL to the creator’s avatar
‣   description - the description the user entered on his/her
    settings page
‣   url - the URL the user entered on his/her settings page
Timelines
Getting lots of tweets
Timelines
‣   “Arrays” or “lists” of Tweets
    ‣   in XML, wrapped with <statuses>...</statuses>
    ‣   in JSON, regular array [...]
‣   Sorted (mostly) chronologically (hence “timeline”)
‣   When statuses are created in the system, they are fanned-out to
    timelines
Few different timelines for the user
‣   user_timeline - all the tweets you created
‣   friends_timeline - all the tweets that people you follow have
    created (sans native RTs)
‣   home_timeline - next generation friends_timeline in that it
    contains native RTs
‣   mentions - all tweets that @mention you


‣   Some don’t require authentication and some do
Taking a look at @raffi’s user_timeline
[raffi@tw-mbp13-raffi twurl (master)]$ curl http://api.twitter.com/1/statuses/
user_timeline/raffi.xml
<?xml version="1.0" encoding="UTF-8"?>
<statuses type="array">
<status>
  <created_at>Tue May 11 02:24:33 +0000 2010</created_at>
  <id>13763485927</id>
  <text>@precipice woot!</text>
  <source>web</source>
  <truncated>false</truncated>
  <in_reply_to_status_id>13763157270</in_reply_to_status_id>
  <in_reply_to_user_id>236</in_reply_to_user_id>
  <favorited>false</favorited>
  <in_reply_to_screen_name>precipice</in_reply_to_screen_name>
  <user>
    <id>8285392</id>
    <name>raffi</name>
    <screen_name>raffi</screen_name>
    <location>San Francisco, California</location>
    <description>Tinkering, writing, engineering, and breaking things on the
@twitterapi.</description>
    <profile_image_url>http://a1.twimg.com/profile_images/364041028/raffi-headshot-
casual_normal.png</profile_image_url>
    <url>http://www.mehack.com/</url>
Using skip_user to save bandwidth
‣   Only user/id - have to lookup user data through other means
[raffi@tw-mbp13-raffi twurl (master)]$ curl http://api.twitter.com/1/statuses/
user_timeline/raffi.xml?skip_user=true
<?xml version="1.0" encoding="UTF-8"?>
<statuses type="array">
<status>
  <created_at>Tue May 11 02:24:33 +0000 2010</created_at>
  <id>13763485927</id>
  <text>@precipice woot!</text>
  <source>web</source>
  <truncated>false</truncated>
  <in_reply_to_status_id>13763157270</in_reply_to_status_id>
  <in_reply_to_user_id>236</in_reply_to_user_id>
  <favorited>false</favorited>
  <in_reply_to_screen_name>precipice</in_reply_to_screen_name>
  <user>
    <id>8285392</id>
  </user>
  <geo/>
  <coordinates/>
  <place xmlns:georss="http://www.georss.org/georss">
    <id>ece7b97d252718cc</id>
POSTing to the API
Causing change
Tweeting
Letting the world know your thoughts
status/update
‣   Just POST with a status parameter - that’s it!
[raffi@tw-mbp13-raffi twurl (master)]$ ./bin/twurl -d "status=hey ho" /statuses/
update.xml
<?xml version="1.0" encoding="UTF-8"?>
<status>
  <created_at>Tue May 11 03:39:42 +0000 2010</created_at>
  <id>13767250371</id>
  <text>hey ho</text>
  <source>&lt;a href=&quot;http://www.mehack.com&quot;
rel=&quot;nofollow&quot;&gt;Background image uploading example&lt;/a&gt;</source>
  <truncated>false</truncated>
  <in_reply_to_status_id></in_reply_to_status_id>
  <in_reply_to_user_id></in_reply_to_user_id>
  <favorited>false</favorited>
  <in_reply_to_screen_name></in_reply_to_screen_name>
  <user>
    <id>8307492</id>
    <name>raffibot</name>
    <screen_name>raffibot</screen_name>
    <location>Doing the robot!</location>
    <description></description>
    <profile_image_url>http://a3.twimg.com/profile_images/637865751/
Streaming API
I need it now, now, now, now, now
Streaming API
‣   Maintain a persistent connection to         servers
‣   Get pushed a tweet that matches your predicate in “real-time”
‣   Most useful for server to server integrations
‣   Beginning to experiment with server to client integrations
Get a sample of all the tweets
‣   Use curl for a really simple proof-of-concept client
‣   http://stream.twitter.com/1/statuses/
    sample.xml
‣   Requires basic authorization (username and password)
               http://stream.twitter.com/1/statuses/sample.xml
‣   Only one connection per username
Get the tweets from certain users
‣   http://stream.twitter.com/1/statuses/
    filter.xml
‣   Can pass in a list of user IDs
    ‣   up to 400 users (passed as follow with CSV IDs)
    ‣   get their tweets as they are getting created
Get the tweets containing a certain word
‣   http://stream.twitter.com/1/statuses/
    filter.xml
‣   Can pass in a list of words
    ‣   up to 200 users (passed as track with CSV IDs)
    ‣   e.g. Twitter will match TWITTER, twitter, “Twitter”, twitter.,
        #twitter, and @twitter
    ‣   get tweets as they are getting created
Questions?   Follow me at
             twitter.com/raffi




                           TM

Mais conteúdo relacionado

Semelhante a Developing for @twitterapi #hack4health

Developing for @twitterapi (Techcrunch Disrupt Hackathon)
Developing for @twitterapi (Techcrunch Disrupt Hackathon)Developing for @twitterapi (Techcrunch Disrupt Hackathon)
Developing for @twitterapi (Techcrunch Disrupt Hackathon)
Raffi Krikorian
 
Tips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applicationsTips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applications
Tim Cull
 
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
CODE BLUE
 

Semelhante a Developing for @twitterapi #hack4health (20)

Developing for @twitterapi (Techcrunch Disrupt Hackathon)
Developing for @twitterapi (Techcrunch Disrupt Hackathon)Developing for @twitterapi (Techcrunch Disrupt Hackathon)
Developing for @twitterapi (Techcrunch Disrupt Hackathon)
 
HATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleHATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API Style
 
Api
ApiApi
Api
 
Big data. Opportunità e rischi
Big data. Opportunità e rischiBig data. Opportunità e rischi
Big data. Opportunità e rischi
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
 
Web Security 101
Web Security 101Web Security 101
Web Security 101
 
Web Security
Web SecurityWeb Security
Web Security
 
PHP Secure Programming
PHP Secure ProgrammingPHP Secure Programming
PHP Secure Programming
 
Building a Production-ready Predictive App for Customer Service - Alex Ingerm...
Building a Production-ready Predictive App for Customer Service - Alex Ingerm...Building a Production-ready Predictive App for Customer Service - Alex Ingerm...
Building a Production-ready Predictive App for Customer Service - Alex Ingerm...
 
Intro to Rails ActiveRecord
Intro to Rails ActiveRecordIntro to Rails ActiveRecord
Intro to Rails ActiveRecord
 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG Presentation
 
Tips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applicationsTips and tricks for building api heavy ruby on rails applications
Tips and tricks for building api heavy ruby on rails applications
 
Building Secure Twitter Apps
Building Secure Twitter AppsBuilding Secure Twitter Apps
Building Secure Twitter Apps
 
Roberto Bicchierai - Defending web applications from attacks
Roberto Bicchierai - Defending web applications from attacksRoberto Bicchierai - Defending web applications from attacks
Roberto Bicchierai - Defending web applications from attacks
 
Demystifying Initial Access in Azure
Demystifying Initial Access in AzureDemystifying Initial Access in Azure
Demystifying Initial Access in Azure
 
Build a Twitter Bot with Basic Python
Build a Twitter Bot with Basic PythonBuild a Twitter Bot with Basic Python
Build a Twitter Bot with Basic Python
 
Ams adapters
Ams adaptersAms adapters
Ams adapters
 
Introduction to Active Record - Silicon Valley Ruby Conference 2007
Introduction to Active Record - Silicon Valley Ruby Conference 2007Introduction to Active Record - Silicon Valley Ruby Conference 2007
Introduction to Active Record - Silicon Valley Ruby Conference 2007
 
API Design - 3rd Edition
API Design - 3rd EditionAPI Design - 3rd Edition
API Design - 3rd Edition
 
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
 

Mais de Raffi Krikorian

Twitter: Engineering for Real-Time (Stanford ACM 2011)
Twitter: Engineering for Real-Time (Stanford ACM 2011)Twitter: Engineering for Real-Time (Stanford ACM 2011)
Twitter: Engineering for Real-Time (Stanford ACM 2011)
Raffi Krikorian
 
Securing Your Ecosystem (FOWA Las Vegas 2011)
Securing Your Ecosystem (FOWA Las Vegas 2011)Securing Your Ecosystem (FOWA Las Vegas 2011)
Securing Your Ecosystem (FOWA Las Vegas 2011)
Raffi Krikorian
 
Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)
Raffi Krikorian
 
"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp
Raffi Krikorian
 
WattzOn @ ETech 2009
WattzOn @ ETech 2009WattzOn @ ETech 2009
WattzOn @ ETech 2009
Raffi Krikorian
 

Mais de Raffi Krikorian (20)

Hacking Conway's Law
Hacking Conway's LawHacking Conway's Law
Hacking Conway's Law
 
Re-architecting on the Fly #OReillySACon
Re-architecting on the Fly #OReillySACon Re-architecting on the Fly #OReillySACon
Re-architecting on the Fly #OReillySACon
 
Real-time systems at Twitter (Velocity 2012)
Real-time systems at Twitter (Velocity 2012)Real-time systems at Twitter (Velocity 2012)
Real-time systems at Twitter (Velocity 2012)
 
Twitter: Engineering for Real-Time (Stanford ACM 2011)
Twitter: Engineering for Real-Time (Stanford ACM 2011)Twitter: Engineering for Real-Time (Stanford ACM 2011)
Twitter: Engineering for Real-Time (Stanford ACM 2011)
 
Securing Your Ecosystem (FOWA Las Vegas 2011)
Securing Your Ecosystem (FOWA Las Vegas 2011)Securing Your Ecosystem (FOWA Las Vegas 2011)
Securing Your Ecosystem (FOWA Las Vegas 2011)
 
#rtgeo (Where 2.0 2011)
#rtgeo (Where 2.0 2011)#rtgeo (Where 2.0 2011)
#rtgeo (Where 2.0 2011)
 
500Startups @ Twitter
500Startups @ Twitter500Startups @ Twitter
500Startups @ Twitter
 
Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)Twitter for CS10 @ Berkeley (Spring 2011)
Twitter for CS10 @ Berkeley (Spring 2011)
 
Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)Twitter by the Numbers (Columbia University)
Twitter by the Numbers (Columbia University)
 
Users and Geo
Users and GeoUsers and Geo
Users and Geo
 
Twitter and the Real-Time Web
Twitter and the Real-Time WebTwitter and the Real-Time Web
Twitter and the Real-Time Web
 
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
 
Twitter by the Numbers
Twitter by the NumbersTwitter by the Numbers
Twitter by the Numbers
 
How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010How to use Geolocation in your webapp @ FOWA Dublin 2010
How to use Geolocation in your webapp @ FOWA Dublin 2010
 
Twitter API Annotations
Twitter API AnnotationsTwitter API Annotations
Twitter API Annotations
 
"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp"What's Happening" to "What's Happening Here" @ Chirp
"What's Happening" to "What's Happening Here" @ Chirp
 
Energy / Tweet
Energy / TweetEnergy / Tweet
Energy / Tweet
 
Handling Real-time Geostreams
Handling Real-time GeostreamsHandling Real-time Geostreams
Handling Real-time Geostreams
 
Adding the "Where" to the "When"
Adding the "Where" to the "When"Adding the "Where" to the "When"
Adding the "Where" to the "When"
 
WattzOn @ ETech 2009
WattzOn @ ETech 2009WattzOn @ ETech 2009
WattzOn @ ETech 2009
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Developing for @twitterapi #hack4health

  • 2. giving a talk about coding for the giving an @ignite talk at @chirp entitled @twitterapi over Skype! "energy / tweet". #hack4health about 2 minutes ago via mobile web from Fort Mason, San Francisco
  • 3. What is ? How to use the Twitter Platform
  • 4. What is ? ‣ REST API ‣ provides the “basic” functionality - tweet, follow, etc. ‣ all functions available on your timeline on twitter.com ‣ Search API ‣ real-time search index ‣ get “top tweets” / relevant search results ‣ Streaming API ‣ HTTP long-poll connection ‣ tweets come out of the system in real-time
  • 5. Tools of the trade ‣ dev.twitter.com ‣ documentation center ‣ API console for quick testing and exploration ‣ curl and a web browser ‣ testing unauthenticated endpoints ‣ CLI to get a raw dump of the interaction ‣ twurl ‣ OAuth-enabled version of curl
  • 6. Authenticating to ‣ OAuth 1.0a ‣ signing “write” requests ‣ give visibility into the stack ‣ Applications don’t have a user’s username / password ‣ user can change password at any time ‣ user is secure in knowing his/her password not being stored outside of ‣ user can revoke permissions to app at any time
  • 7. twurl ‣ http://github.com/marcel/twurl ‣ Command line tool to interact with using OAuth ‣ Transparently handles OAuth signing against ‣ authorize against to get access tokens ‣ from there on out, all requests are signed
  • 9. Creating an app Your own small playground
  • 10.
  • 11.
  • 12.
  • 13. Anatomy of the REST API What if I want to write code?
  • 14. GETing from the API Reading, reading, reading
  • 15. GETing from the API ‣ For most cases, completely wide open ‣ Can do a HTTP connect and a simple GET request ‣ “Protected” information may require authentication (covered later) ‣ getting the tweet of a protected user ‣ getting the timeline of a user
  • 16. Status objects The basis of everything
  • 17. Getting a status object ‣ Figure out the ID of the status objects ‣ Construct the URL for statuses/show ‣ Grab it!
  • 18.
  • 19. Taking a look at status 13762161921 ‣ Build the API URL ‣ http://api.twitter.com/1/statuses/show/ 13762161921.xml ‣ http://api.twitter.com/1/statuses/show/ 13762161921.json ‣ If it’s a public status, then just fetch it ‣ use a browser! ‣ use curl!
  • 20. Taking a look at status 13762161921 [raffi@tw-mbp13-raffi Desktop]$ curl http://api.twitter.com/1/statuses/show/ 13762161921.xml <?xml version="1.0" encoding="UTF-8"?> <status> <created_at>Tue May 11 01:58:56 +0000 2010</created_at> <id>13762161921</id> <text>...and another late night</text> <source>&lt;a href=&quot;http://mehack.com&quot; rel=&quot;nofollow&quot;&gt;@raffi's Test App&lt;/a&gt;</source> <truncated>false</truncated> <in_reply_to_status_id></in_reply_to_status_id> <in_reply_to_user_id></in_reply_to_user_id> <favorited>false</favorited> <in_reply_to_screen_name></in_reply_to_screen_name> <user> <id>8285392</id> <name>raffi</name> <screen_name>raffi</screen_name> <location>San Francisco, California</location> <description>Tinkering, writing, engineering, and breaking things on the @twitterapi.</description> <profile_image_url>http://a1.twimg.com/profile_images/364041028/raffi-headshot- casual_normal.png</profile_image_url> <url>http://www.mehack.com/</url>
  • 21. Dissecting a status object 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). DEPRECATED {"id"=>12296272736, "text"=> "An early look at Annotations: http://groups.google.com/group/twitter-api-announce/browse_thread/thread/fa5da2608865453", Tweet's "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 author's The screen name & "favorited"=>false, user ID. user ID of replied to referenced tweet is mentioned. "truncated"=>false, Truncated to 140 characters. Only tweet author. "user"=> possible from SMS. The author's {"id"=>6253282, user name. The author's "screen_name"=>"twitterapi", The author's biography. "name"=>"Twitter API", screen name. d object can get out of sync. "description"=> "The Real Twitter API. I tweet about API changes, service issues and uthor 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 field, and "profile_background_color"=>"c1dfee", there are no guarantees on whether it can be geocoded. "profile_background_image_url"=> "http://a3.twimg.com/profile_background_images/59931895/twitterapi-background-new.png", Rendering information "profile_background_tile"=>false, for the author. Colors "profile_image_url"=>"http://a3.twimg.com/profile_images/689684365/api_normal.png",
  • 22. 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). DEPRECATED {"id"=>12296272736, "text"=> "An early look at Annotations: http://groups.google.com/group/twitter-api-announce/browse_thread/thread/fa5da2608865453", Tweet's "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 author's The screen name & "favorited"=>false, user ID. user ID of replied to referenced tweet is mentioned. "truncated"=>false, Truncated to 140 characters. Only tweet author. "user"=> possible from SMS. The author's {"id"=>6253282, user name. The author's "screen_name"=>"twitterapi", The author's biography. "name"=>"Twitter API", screen name. get out of sync. "description"=> "The Real Twitter API. I tweet about API changes, service issues and 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 field, and
  • 23. "favorited"=>false, referenced tweet is mentioned. user ID user ID of replied to The auth "truncated"=>false, Truncated to 140 characters. Only tweet author. "user"=> possible from SMS. The author's {"id"=>6253282, user name. The author's "screen_name"=>"twitterapi", The author's biography. "name"=>"Twitter API", screen name. embedded object can get out of sync. "description"=> "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 field, and "profile_background_color"=>"c1dfee", there are no guarantees on whether it can be geocoded. "profile_background_image_url"=> "http://a3.twimg.com/profile_background_images/59931895/twitterapi-background-new.png", Rendering information "profile_background_tile"=>false, for the author. Colors "profile_image_url"=>"http://a3.twimg.com/profile_images/689684365/api_normal.png", are encoded in hex "profile_link_color"=>"0000ff", values (RGB). "profile_sidebar_border_color"=>"87bc44", The creation date "profile_sidebar_fill_color"=>"e0ff92", for this account. "profile_text_color"=>"000000", Whether this account has "created_at"=>"Wed May 23 06:01:13 +0000 2007", contributors enabled "contributors_enabled"=>true, (http://bit.ly/50npuu). Number of Number of tweets "favourites_count"=>1, favorites this this user has. "statuses_count"=>1628, Number of user has. "friends_count"=>13, users this user "time_zone"=>"Pacific Time (US & Canada)", The timezone and offset is following. "utc_offset"=>-28800, (in seconds) for this user. "lang"=>"en", The user's selected "protected"=>false, language. "followers_count"=>100581, "geo_enabled"=>true, Whether this user is protected http://bit.ly/4pFY77). "notifications"=>false, DEPRECATED r this user has geo or not. If the user is protected, "following"=>true, in this context Number of then this tweet is not visible "verified"=>true}, Whether this user followers for except to "friends". "contributors"=>[3191321], has a verified badge. this user. "geo"=>nil, "coordinates"=>nil, DEPRECATED "place"=> The contributors' (if any) user
  • 24. The fields you really need ‣ id - the unique identifier for the status ‣ text - the content of the status update ‣ created_at - the date the status was created at ‣ user/id - the unique identifier for the status creator ‣ user/screen_name - the name of the status creator ‣ user/profile_image_url - the URL to the creator’s avatar
  • 26. Getting an user object ‣ You can do this with a screen name or an ID ‣ Construct the URL for users/show ‣ Grab it! ‣ (and, status objects do have embedded users)
  • 27. Taking a look at @raffi ‣ Build the API URL ‣ http://api.twitter.com/1/users/show/raffi.xml ‣ http://api.twitter.com/1/users/show/raffi.json ‣ http://api.twitter.com/1/users/show.xml? user_id=8285392 ‣ http://api.twitter.com/1/users/show.json? user_id=8285392 ‣ Just fetch it!
  • 28. Taking a look at user @raffi [raffi@tw-mbp13-raffi Desktop]$ curl http://api.twitter.com/1/users/show/raffi.xml <?xml version="1.0" encoding="UTF-8"?> <user> <id>8285392</id> <name>raffi</name> <screen_name>raffi</screen_name> <location>San Francisco, California</location> <description>Tinkering, writing, engineering, and breaking things on the @twitterapi.</description> <profile_image_url>http://a1.twimg.com/profile_images/364041028/raffi-headshot- casual_normal.png</profile_image_url> <url>http://www.mehack.com/</url> <protected>false</protected> <followers_count>2862</followers_count> <profile_background_color>C0DEED</profile_background_color> <profile_text_color>333333</profile_text_color> <profile_link_color>0084B4</profile_link_color> <profile_sidebar_fill_color>DDEEF6</profile_sidebar_fill_color> <profile_sidebar_border_color>C0DEED</profile_sidebar_border_color> <friends_count>424</friends_count> <created_at>Sun Aug 19 14:24:06 +0000 2007</created_at> <favourites_count>45</favourites_count> <utc_offset>-28800</utc_offset> <time_zone>Pacific Time (US &amp; Canada)</time_zone>
  • 29. The fields you really need ‣ id - the unique identifier for the user ‣ screen_name - the screen name of the user ‣ name - the name the user entered on his/her settings page ‣ profile_image_url - the URL to the creator’s avatar ‣ description - the description the user entered on his/her settings page ‣ url - the URL the user entered on his/her settings page
  • 31. Timelines ‣ “Arrays” or “lists” of Tweets ‣ in XML, wrapped with <statuses>...</statuses> ‣ in JSON, regular array [...] ‣ Sorted (mostly) chronologically (hence “timeline”) ‣ When statuses are created in the system, they are fanned-out to timelines
  • 32. Few different timelines for the user ‣ user_timeline - all the tweets you created ‣ friends_timeline - all the tweets that people you follow have created (sans native RTs) ‣ home_timeline - next generation friends_timeline in that it contains native RTs ‣ mentions - all tweets that @mention you ‣ Some don’t require authentication and some do
  • 33. Taking a look at @raffi’s user_timeline [raffi@tw-mbp13-raffi twurl (master)]$ curl http://api.twitter.com/1/statuses/ user_timeline/raffi.xml <?xml version="1.0" encoding="UTF-8"?> <statuses type="array"> <status> <created_at>Tue May 11 02:24:33 +0000 2010</created_at> <id>13763485927</id> <text>@precipice woot!</text> <source>web</source> <truncated>false</truncated> <in_reply_to_status_id>13763157270</in_reply_to_status_id> <in_reply_to_user_id>236</in_reply_to_user_id> <favorited>false</favorited> <in_reply_to_screen_name>precipice</in_reply_to_screen_name> <user> <id>8285392</id> <name>raffi</name> <screen_name>raffi</screen_name> <location>San Francisco, California</location> <description>Tinkering, writing, engineering, and breaking things on the @twitterapi.</description> <profile_image_url>http://a1.twimg.com/profile_images/364041028/raffi-headshot- casual_normal.png</profile_image_url> <url>http://www.mehack.com/</url>
  • 34. Using skip_user to save bandwidth ‣ Only user/id - have to lookup user data through other means [raffi@tw-mbp13-raffi twurl (master)]$ curl http://api.twitter.com/1/statuses/ user_timeline/raffi.xml?skip_user=true <?xml version="1.0" encoding="UTF-8"?> <statuses type="array"> <status> <created_at>Tue May 11 02:24:33 +0000 2010</created_at> <id>13763485927</id> <text>@precipice woot!</text> <source>web</source> <truncated>false</truncated> <in_reply_to_status_id>13763157270</in_reply_to_status_id> <in_reply_to_user_id>236</in_reply_to_user_id> <favorited>false</favorited> <in_reply_to_screen_name>precipice</in_reply_to_screen_name> <user> <id>8285392</id> </user> <geo/> <coordinates/> <place xmlns:georss="http://www.georss.org/georss"> <id>ece7b97d252718cc</id>
  • 35. POSTing to the API Causing change
  • 36. Tweeting Letting the world know your thoughts
  • 37. status/update ‣ Just POST with a status parameter - that’s it! [raffi@tw-mbp13-raffi twurl (master)]$ ./bin/twurl -d "status=hey ho" /statuses/ update.xml <?xml version="1.0" encoding="UTF-8"?> <status> <created_at>Tue May 11 03:39:42 +0000 2010</created_at> <id>13767250371</id> <text>hey ho</text> <source>&lt;a href=&quot;http://www.mehack.com&quot; rel=&quot;nofollow&quot;&gt;Background image uploading example&lt;/a&gt;</source> <truncated>false</truncated> <in_reply_to_status_id></in_reply_to_status_id> <in_reply_to_user_id></in_reply_to_user_id> <favorited>false</favorited> <in_reply_to_screen_name></in_reply_to_screen_name> <user> <id>8307492</id> <name>raffibot</name> <screen_name>raffibot</screen_name> <location>Doing the robot!</location> <description></description> <profile_image_url>http://a3.twimg.com/profile_images/637865751/
  • 38. Streaming API I need it now, now, now, now, now
  • 39. Streaming API ‣ Maintain a persistent connection to servers ‣ Get pushed a tweet that matches your predicate in “real-time” ‣ Most useful for server to server integrations ‣ Beginning to experiment with server to client integrations
  • 40. Get a sample of all the tweets ‣ Use curl for a really simple proof-of-concept client ‣ http://stream.twitter.com/1/statuses/ sample.xml ‣ Requires basic authorization (username and password) http://stream.twitter.com/1/statuses/sample.xml ‣ Only one connection per username
  • 41. Get the tweets from certain users ‣ http://stream.twitter.com/1/statuses/ filter.xml ‣ Can pass in a list of user IDs ‣ up to 400 users (passed as follow with CSV IDs) ‣ get their tweets as they are getting created
  • 42. Get the tweets containing a certain word ‣ http://stream.twitter.com/1/statuses/ filter.xml ‣ Can pass in a list of words ‣ up to 200 users (passed as track with CSV IDs) ‣ e.g. Twitter will match TWITTER, twitter, “Twitter”, twitter., #twitter, and @twitter ‣ get tweets as they are getting created
  • 43. Questions? Follow me at twitter.com/raffi TM