SlideShare una empresa de Scribd logo
1 de 101
Descargar para leer sin conexión
TM




     1
What's Next & Big with Twitter
       #tmeetup @themattharris @raffi @hackerdojo




@hackerdojo                                         TM



July 1, 2010
                                                         2
About us


           TM




                3
The   team




             TM




                  4
@themattharris
About us




                 TM




                      5
@raffi
About us




           TM




                6
TM




     7
160,000


          TM




               8
160,000
Registered third-party Applications




                                      TM




                                           9
75%


      TM




           10
75%
Traffic on Twitter comes from places outside of twitter.com




                                                             TM




                                                                  11
65 Million


             TM




                  12
65 Million
Tweets per day




                 TM




                      13
65%


      TM




           14
65%
Users are outside of the United States




                                         TM




                                              15
3.5 Billion


              TM




                   16
3.5 Billion
Requests per day to the API




                              TM




                                   17
2,928


        TM




             18
2,928
Tweets-per-second (June 14 2010, Brazil vs North Korea)




                                                          TM




                                                               19
2,928 3,283
Tweets-per-second (June 24 2010, Japan vs Denmark)




                                                     TM




                                                          20
What is                ?
The Twitter Platform




                           TM




                                21
What is               ?
‣   REST API
‣   provides the “basic” Twitter 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                         TM




                                                                            22
The goals of
‣   To be ridiculously simple
‣   To be obvious
‣   To be self-describing




                                TM




                                     23
Authenticating to
‣   OAuth 1.0a
‣   Signing “write” requests
‣   Give Twitter visibility into the stack
‣   Applications don’t have the user’s username / password
‣   User can change password at any time
‣   User is secure in knowing his/her password is not stored
‣   User can revoke permissions to app at any time
‣   User has one place to see which applications have access to their account
                                                                          TM




                                                                                24
twurl
‣   http://github.com/marcel/twurl
‣   Command line tool to interact      with using OAuth
‣   Transparently handles OAuth signing against
‣   POST and GET data
‣   Trace requests




                                                          TM




                                                               25
Limits
‣   175 API calls/hour using OAuth against api.twitter.com
‣   Unauthenticated it goes against the source IP address
‣   Authenticated it goes against the calling user
‣   “Natural” limits on
    ‣   number of tweets sent
    ‣   number of DMs sent
    ‣   number of followings / unfollowings
‣   Status limits
‣   No duplicate tweets
‣   No malware links in tweets                               TM




                                                                  26
@anywhere


            TM




                 27
Core Features
‣   Hovercards
‣   Tweet Box
‣   Follow Buttons
‣   Linkify




                     TM




                          28
Easiest Example
<!DOCTYPE HTML>
<html>
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Anywhere Sample</title>
    <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1">
    </script>
    <script type="text/javascript">
       twttr.anywhere(function(T) {
         T.hovercards();
         T("#follow-placeholder").followButton('themattharris');
         T("#tbox").tweetBox();
       });
    </script>
  </head>
  <body>
    <p>Some text with @twitter screen names in it.</p>

    <div id="tweets"></div>
    <div id="tbox"></div>
    <span id="follow-placeholder"></span>
  </body>
</html>
                                                                                     TM




                                                                                          29
Easiest Example




                  TM




                       30
Easiest Example
<head>
  <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1">
  </script>
  <script type="text/javascript">
    twttr.anywhere(function(T) {
       T.hovercards();
       T("#follow-placeholder").followButton('themattharris');
       T("#tbox").tweetBox();
    });
  </script>
</head>




                                                                              TM




                                                                                   31
Easiest Example
<head>
  <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1">
  </script>
  <script type="text/javascript">
    twttr.anywhere(function(T) {
       T.hovercards();
       T("#follow-placeholder").followButton('themattharris');
       T("#tbox").tweetBox();
    });
  </script>
</head>




                                                                              TM




                                                                                   32
Easiest Example
<head>
  <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1">
  </script>
  <script type="text/javascript">
    twttr.anywhere(function(T) {
       T.hovercards();
       T("#follow-placeholder").followButton('themattharris');
       T("#tbox").tweetBox();
    });
  </script>
</head>




                                                                              TM




                                                                                   33
Easiest Example
<head>
  <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1">
  </script>
  <script type="text/javascript">
    twttr.anywhere(function(T) {
       T.hovercards();
       T("#follow-placeholder").followButton('themattharris');
       T("#tbox").tweetBox();
    });
  </script>
</head>




                                                                              TM




                                                                                   34
Complex Example
twttr.anywhere(function (T) {
  var currentUser,
      screenName,
      profileImage,
      profileImageTag;

  var onLogin = function() {
    currentUser = T.currentUser;
    screenName = currentUser.data('screen_name');
    profileImage = currentUser.data('profile_image_url');
    profileImageTag = "<img src='" + profileImage + "'/>";

       document.getElementById('connect-placeholder').innerHTML =
         "Logged in as " + profileImageTag + " @" + screenName;
       document.getElementById('tbox').style.display = 'block';
       document.getElementById('follow-placeholder').style.display = 'block';
       document.getElementById('signout').style.display = 'block';


       T("#follow-placeholder").followButton('themattharris');
       T("#tbox").tweetBox({
         label: "Careful! This is a real tweet box.",
         defaultContent: "tweet tweet ",
         height: 300,
         width: 700
       });
  },                                                                            TM




                                                                                     35
Complex Example
  cleanup = function() {
     document.getElementById('connect-placeholder').innerHTML = '';
     document.getElementById('signout').style.display = 'none';
     document.getElementById('tbox').style.display = 'none';
     document.getElementById('follow-placeholder').style.display = 'none';
  },
  init = function() {
     if (T.isConnected()) {
       onLogin();
     } else {
       T("#connect-placeholder").connectButton({
         authComplete: function(user) {
            onLogin();
         },
         signOut: function() {
            cleanup();
            init();
         }
       });
     }
  };
  init();
  T.hovercards({
     expanded: true
  });
});
                                                                             TM




                                                                                  36
Easiest Example




                  TM




                       37
More Info...   Check out
               bit.ly/anywhere-begin




                                       TM




                                            38
OAuthpocalypse
The day is 30th June 16th August 2010




                                        TM




                                             39
What you need to know
‣   All applications must be using OAuth for the REST API
‣   Streaming API will still support Basic Auth
‣   Search API has no auth
‣   OAuth key exchange for Open Source Applications
‣   Replace curl with twurl for debugging


                 http://dev.twitter.com/pages/auth_overview
                       http://github.com/marcel/twurl
                                                              TM




                                                                   40
OAuth Methods
‣   Web must use three legged OAuth
‣   Desktop and mobile apps can also use out-of-band OAuth
‣   Some desktop and mobile apps will be considered for xAuth




                                                                TM




                                                                     41
xAuth not XAuth



       xAuth is OAuth

          http://dev.twitter.com/pages/xauth

                                               TM




                                                    42
Check your host!



        api.twitter.com

           twitter.com
                          TM




                               43
Libraries
ActionScript/Flash          Objective-C/Cocoa & iPhone Programming
C/C++                       Perl
C#/.NET                     PHP
Clojure                     Python
Erlang                      Qt
Java                        Ruby
JavaScript                  Scala

http://dev.twitter.com/pages/oauth_libraries



                                                                     TM




                                                                          44
OAuth Echo


             TM




                  45
OAuth Echo
‣   Delegation for Identity Verification
‣   Pass the header needed for an application to confirm your
    identify with Twitter




                                                                TM




                                                                     46
Services offering it
‣   yFrog              ‣   Mobypicture
‣   TwitPic            ‣   Twitgoo
‣   TwitVid            ‣   Posterous
‣   TweetPhoto         ‣   img.ly
                       ‣   Vodpod




                                         TM




                                              47
Geo


      TM




           48
Endpoints
‣   /1/geo/search
‣   /1/geo/similar_places
‣   /1/geo/reverse_geocode
‣   /1/geo/id/:id
‣   /1/geo/place




                             TM




                                  49
/1/geo/search
‣   Find places to use in status updates
‣   Search by lat, long, IP or free-form name. Also search by attribute.
‣   Limit to poi, neighborhood, city, admin or country
‣   Find only places within another if desired
‣   Set a callback
‣   Use authorisation to bias ordering to the users location history

                     http://api.twitter.com/1/geo/search.json

                                                                           TM




                                                                                50
/1/geo/similar_places
‣   Find places to use in status updates
‣   Search by lat, long, free-form name. Also search by attribute.
‣   Find only places within another if desired
‣   Set a callback
‣   Search by attribute


               http://api.twitter.com/1/geo/similar_places.json

                                                                     TM




                                                                          51
/1/geo/similar_places
‣   Must make this call before creating a place
‣   Returns a creation token




               http://api.twitter.com/1/geo/similar_places.json

                                                                  TM




                                                                       52
/1/geo/reverse_geocode
‣   Find 20 places around the provided lat, long
‣   Limit to poi, neighborhood, city, admin or country
‣   Set a callback
‣   /geo/search is better




             http://api.twitter.com/1/geo/reverse_geocode.json

                                                                 TM




                                                                      53
/1/geo/id/:id
‣   Information on a place
‣   :id from /geo/search methods




                     http://api.twitter.com/1/geo/id/:id

                                                           TM




                                                                54
/1/geo/place
‣   create a place
‣   must have
    ‣   name
    ‣   contained_within - place_id of another place, e.g. city
    ‣   token
    ‣   lat, long
‣   Set a callback
                         http://api.twitter.com/1/geo/place

                                                                  TM




                                                                       55
Create a place - the flow
‣   /1/geo/search
    ‣   show what’s nearby
‣   /1/geo/similar_places
    ‣   not found in search, find by name
‣   /1/geo/place
    ‣   still not found, create a new place

                         http://api.twitter.com/1/geo/place

                                                              TM




                                                                   56
Use in search
‣   just pass place:place_id




     http://search.twitter.com/search?q=place%3A247f43d441defc03

                                                                   TM




                                                                        57
Attributes   {
                 "name": "Twitter HQ",
                 "polylines": [

                 ],
                 "country_code": "US",
                 "country": "The United States of America",
                 "attributes": {
                    "street_address": "795 Folsom St",
                    "1166:id": "49547",
                    "623:id": "210176"
                 },
                 "url": "http://api.twitter.com/1/geo/id/247f43d441defc03.json",
                 "id": "247f43d441defc03",
             }
                                                                              TM




                                                                                   58
Timelines


            TM




                 59
Timeline Endpoints
‣   /1/statuses/public_timeline
‣   /1/statuses/home_timeline
‣   /1/statuses/friends_timeline
‣   /1/statuses/status_timeline
‣   /1/statuses/mentions
‣   /1/statuses/retweeted_by_me
‣   /1/statuses/retweeted_to_me
‣   /1/statuses/retweets_of_me


                                   TM




                                        60
Modifiers
‣   include_rts




Accepted values: true, 1, t

                              TM




                                   61
Modifiers
‣   include_rts
‣   include_entities




Accepted values: true, 1, t

                              TM




                                   62
Modifiers
‣   include_rts
‣   include_entities
‣   trim_user




Accepted values: true, 1, t

                              TM




                                   63
What is a Tweet?
The anatomy of a status update




                                 TM




                                      64
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.
 ded object can get out of sync.




                                      "description"=>
                                      "The Real Twitter API. I tweet about API changes, service issues and
 e 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"=>
                                                                                                                                                                            TM
                                      "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",                                                                                                            65
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.
n get out of sync.




                        "description"=>
                        "The Real Twitter API. I tweet about API changes, service issues and
e tweet. This




                         happily answer questions about Twitter and our API. Don't get an answer? It's on my website.",                                    TM
                        "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.                                  66
The screen name &
                                       "favorited"=>false,




  user ID.
The autho
                                                                                                                referenced tweet is mentioned.
                                                                                                user ID of replied to
                                       "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
enabled (http://bit.ly/4pFY77).




                                         "notifications"=>false,     DEPRECATED
 Whether 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                                TM
                                                                                              The place ID                  IDs (http://bit.ly/50npuu).
                                        {"id"=>"2b6ff8c22edd9576",
                                         "url"=>"http://api.twitter.com/1/geo/id/2b6ff8c22edd9576.json",
                                         "name"=>"SoMa",                                                                  The URL to fetch a detailed                                        67
Context is everything


                        TM




                             68
#hashtags
Those things you add to a Tweet for grouping




                                               TM




                                                    69
@mentions
Talk about or to another user




                                TM




                                     70
51.495466,-0.146341
Locates a Tweet




                      TM




                           71
via My App
what created the Tweet




                         TM




                              72
dev.twitter.com
The developer portal




                       TM




                            73
Creating an app
Your own small playground




                            TM




                                 74
TM




     75
TM




     76
TM




     77
Browsing docs
Remembering how to read




                          TM




                               78
TM




     79
TM




     80
TM




     81
Streaming API
Near-Realtime Access to Public Statuses




                                          TM




                                               82
Streaming API
‣   A persistent connection to Twitter servers
‣   Get pushed a tweet that matches your predicate in “real-time”
‣   Server to server integrations




                                                                    TM




                                                                         83
Basic Usage
‣   Curl with Basic Auth or Twurl with OAuth
‣   One connection per username permitted



              http://stream.twitter.com/1/statuses/sample.json




                                                                 TM




                                                                      84
Follow some users
‣   Curl with Basic Auth or Twurl with OAuth
‣   One connection per username permitted
‣   Pass up to 400 user_ids, comma seperated



               http://stream.twitter.com/1/statuses/filter.json




                                                                  TM




                                                                       85
Filter by keyword
‣   Curl with Basic Auth or Twurl with OAuth
‣   One connection per username permitted
‣   Pass up to 200 keywords, comma seperated
‣   Example: Twitter will return statuses which contain: TWITTER,
    twitter, "Twitter", twitter., #twitter and @twitter



               http://stream.twitter.com/1/statuses/filter.json

                                                                    TM




                                                                         86
Streaming API - Access Levels
‣   Default




                                TM




                                     87
Streaming API - Default Level
‣   200 x Keywords
‣   400 x Follow userids
‣   10 x 1-degree location boxes




                                   TM




                                        88
Streaming API - Access Levels
‣   Default
‣   Shadow - many followings
‣   Birddog - many more followings
‣   Restricted Track - many keywords
‣   Partner Track - many more keywords
‣   locRestricted - many locations



                                         TM




                                              89
Streaming API - Access Levels
‣   Default
‣   Shadow - many followings
‣   Birddog - many more followings
‣   Restricted Track - many keywords
‣   Partner Track - many more keywords
‣   locRestricted - many locations
‣   Firehose - all public statuses

                                         TM




                                              90
Streaming API - Firehose




                           TM




                                91
More Info...   Check out
               bit.ly/streaming_api




                                      TM




                                           92
Userstreams
Real-time updates of all data needed to update a desktop
application display




                                                           TM




                                                                93
TA
BE

 Userstreams
 Real-time updates of all data needed to update a desktop
 application display




                                                            TM




                                                                 94
TA Keyfacts
BE    ‣   Rate limits practically eliminated
      ‣   Hit the API for backfill of data
      ‣   Transition to userstream for real-time updates
      ‣   Social events streamed too




                                                           TM




                                                                95
TA
BE

  More Info...   Check out
                 bit.ly/userstreams-beta
                 bit.ly/userstreams-overview




                                       TM




                                               96
Stay Informed...   Join
                   bit.ly/twitter-anywhere-talk
                   bit.ly/twitter-dev-talk

                   Important Stuff
                   @twitterapi
                   status.twitter.com
                   bit.ly/twitter-api-announce


                                           TM




                                                  97
Help...   Check out
          dev.twitter.com




                            TM




                                 98
Join the Flock!   Find out more
                  jobs.twitter.com




                                     TM




                                          99
Questions?   Follow us at
             twitter.com/twitterapi
             twitter.com/themattharris
             twitter.com/raffi




                                    TM




                                         100
TM




     101

Más contenido relacionado

Similar a Twitter Meetup at the Hacker Dojo

TwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキングTwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキングTakashi Nojima
 
ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...
ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...
ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...Cyber Security Alliance
 
Development of Twitter Application #3 - OAuth
Development of Twitter Application #3 - OAuthDevelopment of Twitter Application #3 - OAuth
Development of Twitter Application #3 - OAuthMyungjin Lee
 
Life at Twitter + Career Advice for Students
Life at Twitter + Career Advice for StudentsLife at Twitter + Career Advice for Students
Life at Twitter + Career Advice for StudentsChris Aniszczyk
 
[Droidcon NL 2013] Developing Cross-Platform Apps
[Droidcon NL 2013] Developing Cross-Platform Apps[Droidcon NL 2013] Developing Cross-Platform Apps
[Droidcon NL 2013] Developing Cross-Platform AppsKenichi Kambara
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngineikailan
 
Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)danwrong
 
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfileDublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfileJean-Louis MONTEIRO
 
twitteRで快適Rライフ!
twitteRで快適Rライフ!twitteRで快適Rライフ!
twitteRで快適Rライフ!Takeshi Arabiki
 
T3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokensT3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokensRuben Chavarri
 
Lightweight Enterprise Java With Microprofile
Lightweight Enterprise Java With MicroprofileLightweight Enterprise Java With Microprofile
Lightweight Enterprise Java With MicroprofileRoberto Cortez
 
2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWT2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWTJean-Louis MONTEIRO
 
Social media analysis in R using twitter API
Social media analysis in R using twitter API Social media analysis in R using twitter API
Social media analysis in R using twitter API Mohd Shadab Alam
 
Sentiment analysis- Modi, Trump, Putin
Sentiment analysis- Modi, Trump, PutinSentiment analysis- Modi, Trump, Putin
Sentiment analysis- Modi, Trump, PutinAhmed Zaidi
 
[App devcon 18] Brace yourself with Android Architecture Components
[App devcon 18] Brace yourself with Android Architecture Components[App devcon 18] Brace yourself with Android Architecture Components
[App devcon 18] Brace yourself with Android Architecture ComponentsMichelantonio Trizio
 
Asynchronous Application Patterns in C# - MonkeySpace
Asynchronous Application Patterns in C# - MonkeySpaceAsynchronous Application Patterns in C# - MonkeySpace
Asynchronous Application Patterns in C# - MonkeySpaceFrank Krueger
 

Similar a Twitter Meetup at the Hacker Dojo (20)

TwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキングTwitterKitではじめる OAuthスピードクッキング
TwitterKitではじめる OAuthスピードクッキング
 
ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...
ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...
ASFWS 2012 - Contourner les conditions d’utilisation et l’API du service Twit...
 
Development of Twitter Application #3 - OAuth
Development of Twitter Application #3 - OAuthDevelopment of Twitter Application #3 - OAuth
Development of Twitter Application #3 - OAuth
 
Life at Twitter + Career Advice for Students
Life at Twitter + Career Advice for StudentsLife at Twitter + Career Advice for Students
Life at Twitter + Career Advice for Students
 
Api
ApiApi
Api
 
TwitterLib.js
TwitterLib.jsTwitterLib.js
TwitterLib.js
 
[Droidcon NL 2013] Developing Cross-Platform Apps
[Droidcon NL 2013] Developing Cross-Platform Apps[Droidcon NL 2013] Developing Cross-Platform Apps
[Droidcon NL 2013] Developing Cross-Platform Apps
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
 
Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)
 
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfileDublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
Dublin JUG Stateless Microservice Security via JWT, TomEE and MicroProfile
 
Ti conf
Ti confTi conf
Ti conf
 
twitteRで快適Rライフ!
twitteRで快適Rライフ!twitteRで快適Rライフ!
twitteRで快適Rライフ!
 
T3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokensT3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokens
 
Lightweight Enterprise Java With Microprofile
Lightweight Enterprise Java With MicroprofileLightweight Enterprise Java With Microprofile
Lightweight Enterprise Java With Microprofile
 
2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWT2019 ITkonekt Stateless REST Security with MicroProfile JWT
2019 ITkonekt Stateless REST Security with MicroProfile JWT
 
Mining Georeferenced Data
Mining Georeferenced DataMining Georeferenced Data
Mining Georeferenced Data
 
Social media analysis in R using twitter API
Social media analysis in R using twitter API Social media analysis in R using twitter API
Social media analysis in R using twitter API
 
Sentiment analysis- Modi, Trump, Putin
Sentiment analysis- Modi, Trump, PutinSentiment analysis- Modi, Trump, Putin
Sentiment analysis- Modi, Trump, Putin
 
[App devcon 18] Brace yourself with Android Architecture Components
[App devcon 18] Brace yourself with Android Architecture Components[App devcon 18] Brace yourself with Android Architecture Components
[App devcon 18] Brace yourself with Android Architecture Components
 
Asynchronous Application Patterns in C# - MonkeySpace
Asynchronous Application Patterns in C# - MonkeySpaceAsynchronous Application Patterns in C# - MonkeySpace
Asynchronous Application Patterns in C# - MonkeySpace
 

Último

Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 

Último (20)

Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 

Twitter Meetup at the Hacker Dojo

  • 1. TM 1
  • 2. What's Next & Big with Twitter #tmeetup @themattharris @raffi @hackerdojo @hackerdojo TM July 1, 2010 2
  • 3. About us TM 3
  • 4. The team TM 4
  • 7. TM 7
  • 8. 160,000 TM 8
  • 10. 75% TM 10
  • 11. 75% Traffic on Twitter comes from places outside of twitter.com TM 11
  • 12. 65 Million TM 12
  • 14. 65% TM 14
  • 15. 65% Users are outside of the United States TM 15
  • 16. 3.5 Billion TM 16
  • 17. 3.5 Billion Requests per day to the API TM 17
  • 18. 2,928 TM 18
  • 19. 2,928 Tweets-per-second (June 14 2010, Brazil vs North Korea) TM 19
  • 20. 2,928 3,283 Tweets-per-second (June 24 2010, Japan vs Denmark) TM 20
  • 21. What is ? The Twitter Platform TM 21
  • 22. What is ? ‣ REST API ‣ provides the “basic” Twitter 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 TM 22
  • 23. The goals of ‣ To be ridiculously simple ‣ To be obvious ‣ To be self-describing TM 23
  • 24. Authenticating to ‣ OAuth 1.0a ‣ Signing “write” requests ‣ Give Twitter visibility into the stack ‣ Applications don’t have the user’s username / password ‣ User can change password at any time ‣ User is secure in knowing his/her password is not stored ‣ User can revoke permissions to app at any time ‣ User has one place to see which applications have access to their account TM 24
  • 25. twurl ‣ http://github.com/marcel/twurl ‣ Command line tool to interact with using OAuth ‣ Transparently handles OAuth signing against ‣ POST and GET data ‣ Trace requests TM 25
  • 26. Limits ‣ 175 API calls/hour using OAuth against api.twitter.com ‣ Unauthenticated it goes against the source IP address ‣ Authenticated it goes against the calling user ‣ “Natural” limits on ‣ number of tweets sent ‣ number of DMs sent ‣ number of followings / unfollowings ‣ Status limits ‣ No duplicate tweets ‣ No malware links in tweets TM 26
  • 27. @anywhere TM 27
  • 28. Core Features ‣ Hovercards ‣ Tweet Box ‣ Follow Buttons ‣ Linkify TM 28
  • 29. Easiest Example <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Anywhere Sample</title> <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1"> </script> <script type="text/javascript"> twttr.anywhere(function(T) { T.hovercards(); T("#follow-placeholder").followButton('themattharris'); T("#tbox").tweetBox(); }); </script> </head> <body> <p>Some text with @twitter screen names in it.</p> <div id="tweets"></div> <div id="tbox"></div> <span id="follow-placeholder"></span> </body> </html> TM 29
  • 31. Easiest Example <head> <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1"> </script> <script type="text/javascript"> twttr.anywhere(function(T) { T.hovercards(); T("#follow-placeholder").followButton('themattharris'); T("#tbox").tweetBox(); }); </script> </head> TM 31
  • 32. Easiest Example <head> <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1"> </script> <script type="text/javascript"> twttr.anywhere(function(T) { T.hovercards(); T("#follow-placeholder").followButton('themattharris'); T("#tbox").tweetBox(); }); </script> </head> TM 32
  • 33. Easiest Example <head> <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1"> </script> <script type="text/javascript"> twttr.anywhere(function(T) { T.hovercards(); T("#follow-placeholder").followButton('themattharris'); T("#tbox").tweetBox(); }); </script> </head> TM 33
  • 34. Easiest Example <head> <script src="http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1"> </script> <script type="text/javascript"> twttr.anywhere(function(T) { T.hovercards(); T("#follow-placeholder").followButton('themattharris'); T("#tbox").tweetBox(); }); </script> </head> TM 34
  • 35. Complex Example twttr.anywhere(function (T) { var currentUser, screenName, profileImage, profileImageTag; var onLogin = function() { currentUser = T.currentUser; screenName = currentUser.data('screen_name'); profileImage = currentUser.data('profile_image_url'); profileImageTag = "<img src='" + profileImage + "'/>"; document.getElementById('connect-placeholder').innerHTML = "Logged in as " + profileImageTag + " @" + screenName; document.getElementById('tbox').style.display = 'block'; document.getElementById('follow-placeholder').style.display = 'block'; document.getElementById('signout').style.display = 'block'; T("#follow-placeholder").followButton('themattharris'); T("#tbox").tweetBox({ label: "Careful! This is a real tweet box.", defaultContent: "tweet tweet ", height: 300, width: 700 }); }, TM 35
  • 36. Complex Example cleanup = function() { document.getElementById('connect-placeholder').innerHTML = ''; document.getElementById('signout').style.display = 'none'; document.getElementById('tbox').style.display = 'none'; document.getElementById('follow-placeholder').style.display = 'none'; }, init = function() { if (T.isConnected()) { onLogin(); } else { T("#connect-placeholder").connectButton({ authComplete: function(user) { onLogin(); }, signOut: function() { cleanup(); init(); } }); } }; init(); T.hovercards({ expanded: true }); }); TM 36
  • 38. More Info... Check out bit.ly/anywhere-begin TM 38
  • 39. OAuthpocalypse The day is 30th June 16th August 2010 TM 39
  • 40. What you need to know ‣ All applications must be using OAuth for the REST API ‣ Streaming API will still support Basic Auth ‣ Search API has no auth ‣ OAuth key exchange for Open Source Applications ‣ Replace curl with twurl for debugging http://dev.twitter.com/pages/auth_overview http://github.com/marcel/twurl TM 40
  • 41. OAuth Methods ‣ Web must use three legged OAuth ‣ Desktop and mobile apps can also use out-of-band OAuth ‣ Some desktop and mobile apps will be considered for xAuth TM 41
  • 42. xAuth not XAuth xAuth is OAuth http://dev.twitter.com/pages/xauth TM 42
  • 43. Check your host! api.twitter.com twitter.com TM 43
  • 44. Libraries ActionScript/Flash Objective-C/Cocoa & iPhone Programming C/C++ Perl C#/.NET PHP Clojure Python Erlang Qt Java Ruby JavaScript Scala http://dev.twitter.com/pages/oauth_libraries TM 44
  • 45. OAuth Echo TM 45
  • 46. OAuth Echo ‣ Delegation for Identity Verification ‣ Pass the header needed for an application to confirm your identify with Twitter TM 46
  • 47. Services offering it ‣ yFrog ‣ Mobypicture ‣ TwitPic ‣ Twitgoo ‣ TwitVid ‣ Posterous ‣ TweetPhoto ‣ img.ly ‣ Vodpod TM 47
  • 48. Geo TM 48
  • 49. Endpoints ‣ /1/geo/search ‣ /1/geo/similar_places ‣ /1/geo/reverse_geocode ‣ /1/geo/id/:id ‣ /1/geo/place TM 49
  • 50. /1/geo/search ‣ Find places to use in status updates ‣ Search by lat, long, IP or free-form name. Also search by attribute. ‣ Limit to poi, neighborhood, city, admin or country ‣ Find only places within another if desired ‣ Set a callback ‣ Use authorisation to bias ordering to the users location history http://api.twitter.com/1/geo/search.json TM 50
  • 51. /1/geo/similar_places ‣ Find places to use in status updates ‣ Search by lat, long, free-form name. Also search by attribute. ‣ Find only places within another if desired ‣ Set a callback ‣ Search by attribute http://api.twitter.com/1/geo/similar_places.json TM 51
  • 52. /1/geo/similar_places ‣ Must make this call before creating a place ‣ Returns a creation token http://api.twitter.com/1/geo/similar_places.json TM 52
  • 53. /1/geo/reverse_geocode ‣ Find 20 places around the provided lat, long ‣ Limit to poi, neighborhood, city, admin or country ‣ Set a callback ‣ /geo/search is better http://api.twitter.com/1/geo/reverse_geocode.json TM 53
  • 54. /1/geo/id/:id ‣ Information on a place ‣ :id from /geo/search methods http://api.twitter.com/1/geo/id/:id TM 54
  • 55. /1/geo/place ‣ create a place ‣ must have ‣ name ‣ contained_within - place_id of another place, e.g. city ‣ token ‣ lat, long ‣ Set a callback http://api.twitter.com/1/geo/place TM 55
  • 56. Create a place - the flow ‣ /1/geo/search ‣ show what’s nearby ‣ /1/geo/similar_places ‣ not found in search, find by name ‣ /1/geo/place ‣ still not found, create a new place http://api.twitter.com/1/geo/place TM 56
  • 57. Use in search ‣ just pass place:place_id http://search.twitter.com/search?q=place%3A247f43d441defc03 TM 57
  • 58. Attributes { "name": "Twitter HQ", "polylines": [ ], "country_code": "US", "country": "The United States of America", "attributes": { "street_address": "795 Folsom St", "1166:id": "49547", "623:id": "210176" }, "url": "http://api.twitter.com/1/geo/id/247f43d441defc03.json", "id": "247f43d441defc03", } TM 58
  • 59. Timelines TM 59
  • 60. Timeline Endpoints ‣ /1/statuses/public_timeline ‣ /1/statuses/home_timeline ‣ /1/statuses/friends_timeline ‣ /1/statuses/status_timeline ‣ /1/statuses/mentions ‣ /1/statuses/retweeted_by_me ‣ /1/statuses/retweeted_to_me ‣ /1/statuses/retweets_of_me TM 60
  • 61. Modifiers ‣ include_rts Accepted values: true, 1, t TM 61
  • 62. Modifiers ‣ include_rts ‣ include_entities Accepted values: true, 1, t TM 62
  • 63. Modifiers ‣ include_rts ‣ include_entities ‣ trim_user Accepted values: true, 1, t TM 63
  • 64. What is a Tweet? The anatomy of a status update TM 64
  • 65. 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. ded object can get out of sync. "description"=> "The Real Twitter API. I tweet about API changes, service issues and e 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"=> TM "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", 65
  • 66. 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. n get out of sync. "description"=> "The Real Twitter API. I tweet about API changes, service issues and e tweet. This happily answer questions about Twitter and our API. Don't get an answer? It's on my website.", TM "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. 66
  • 67. The screen name & "favorited"=>false, user ID. The autho referenced tweet is mentioned. user ID of replied to "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 enabled (http://bit.ly/4pFY77). "notifications"=>false, DEPRECATED Whether 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 TM The place ID IDs (http://bit.ly/50npuu). {"id"=>"2b6ff8c22edd9576", "url"=>"http://api.twitter.com/1/geo/id/2b6ff8c22edd9576.json", "name"=>"SoMa", The URL to fetch a detailed 67
  • 69. #hashtags Those things you add to a Tweet for grouping TM 69
  • 70. @mentions Talk about or to another user TM 70
  • 72. via My App what created the Tweet TM 72
  • 74. Creating an app Your own small playground TM 74
  • 75. TM 75
  • 76. TM 76
  • 77. TM 77
  • 79. TM 79
  • 80. TM 80
  • 81. TM 81
  • 82. Streaming API Near-Realtime Access to Public Statuses TM 82
  • 83. Streaming API ‣ A persistent connection to Twitter servers ‣ Get pushed a tweet that matches your predicate in “real-time” ‣ Server to server integrations TM 83
  • 84. Basic Usage ‣ Curl with Basic Auth or Twurl with OAuth ‣ One connection per username permitted http://stream.twitter.com/1/statuses/sample.json TM 84
  • 85. Follow some users ‣ Curl with Basic Auth or Twurl with OAuth ‣ One connection per username permitted ‣ Pass up to 400 user_ids, comma seperated http://stream.twitter.com/1/statuses/filter.json TM 85
  • 86. Filter by keyword ‣ Curl with Basic Auth or Twurl with OAuth ‣ One connection per username permitted ‣ Pass up to 200 keywords, comma seperated ‣ Example: Twitter will return statuses which contain: TWITTER, twitter, "Twitter", twitter., #twitter and @twitter http://stream.twitter.com/1/statuses/filter.json TM 86
  • 87. Streaming API - Access Levels ‣ Default TM 87
  • 88. Streaming API - Default Level ‣ 200 x Keywords ‣ 400 x Follow userids ‣ 10 x 1-degree location boxes TM 88
  • 89. Streaming API - Access Levels ‣ Default ‣ Shadow - many followings ‣ Birddog - many more followings ‣ Restricted Track - many keywords ‣ Partner Track - many more keywords ‣ locRestricted - many locations TM 89
  • 90. Streaming API - Access Levels ‣ Default ‣ Shadow - many followings ‣ Birddog - many more followings ‣ Restricted Track - many keywords ‣ Partner Track - many more keywords ‣ locRestricted - many locations ‣ Firehose - all public statuses TM 90
  • 91. Streaming API - Firehose TM 91
  • 92. More Info... Check out bit.ly/streaming_api TM 92
  • 93. Userstreams Real-time updates of all data needed to update a desktop application display TM 93
  • 94. TA BE Userstreams Real-time updates of all data needed to update a desktop application display TM 94
  • 95. TA Keyfacts BE ‣ Rate limits practically eliminated ‣ Hit the API for backfill of data ‣ Transition to userstream for real-time updates ‣ Social events streamed too TM 95
  • 96. TA BE More Info... Check out bit.ly/userstreams-beta bit.ly/userstreams-overview TM 96
  • 97. Stay Informed... Join bit.ly/twitter-anywhere-talk bit.ly/twitter-dev-talk Important Stuff @twitterapi status.twitter.com bit.ly/twitter-api-announce TM 97
  • 98. Help... Check out dev.twitter.com TM 98
  • 99. Join the Flock! Find out more jobs.twitter.com TM 99
  • 100. Questions? Follow us at twitter.com/twitterapi twitter.com/themattharris twitter.com/raffi TM 100
  • 101. TM 101