Twitter API's par Pascal Alberty, CTO de TweetWallPro
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Twitter API's par Pascal Alberty, CTO de TweetWallPro



Conférence FeWeb - 04/06/2013

Conférence FeWeb - 04/06/2013
Louvain-la-Neuve (Belgium)

More info:



Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Twitter API's par Pascal Alberty, CTO de TweetWallPro Presentation Transcript

  • 1. Twitter APIKeys for creating an awesome application !
  • 2. Pascal Alberty@zorrobiwanCTO Managing Partner
  • 3. Twitter Dev Ecosystem● Twitter success○ Thanks Dev Community !● API○ September 2006○ Very complete○ Open○ Free
  • 4. The APIs● APIs○ Search API○ REST API○ Streaming API○● Versions○ API version 1 (almost deprecated)○ API version 1.1
  • 5. Resources )
  • 6. Authentication● OAuth○ Each API request must be authorized○ Access token on behalf of a Twitter user● Obtaining access token○ Sign in with Twitter○ 3-legged OAuth○ Pin based OAuth○○ ...
  • 7. Declare your application
  • 8. Rate limiting● Rate limit window duration○ 15 minutes● Requests allotted○ per user○ via application-only auth● Example○ GET statuses/user_timeline○ per user: 150 requests per 15 minutes○ via app: 300 requests per 15 minutes
  • 9. Other technical limits● Direct messages○ 250 per day● Tweets○ 1,000 per day○ Retweets are counted as Tweets.● Changes to account email○ Four per hour● Following○ 1,000 per day● Following (account-based)○ up to following 2,000 other users
  • 10. Platform objects● Tweets can be found alone, within user objects, butmost often within timelines● Users can be found tweeting, following, andfavoriting on Twitter● Entities are most often found within Tweets● Places can be found throughout the natural universe,but typically only appear attached to Tweets on Twitter
  • 11. Objects type● JSON !● XML output will be dropped soon○ Only JSON output with API 1.1● Be careful with ids (64 bits)○ use String version (especially if using Javascript)○ Twitpocalypse■○ Idpocalypse■
  • 12. Tweet Example
  • 13. User example
  • 14. Entities / Entity Example● Hashtags, Medias, URLs, User mentions,Symbols● No need to parse● Data used for display also (ex: display_url)
  • 15. Place example
  • 16. Libraries● PHP○ Twitter-async (○ tmhOAuth (○ Zend Framework (● Java○ Twitter4J (
  • 17. Tools● Twurl○○ "curl" for Twitter API○ Manage access tokens (authentication)● Apigee Console○○ Free console to execute APIs
  • 18. Search API● Similar to● Criteria○ terms○ geocode○ language ("Language detection is best-effort")○ count, until, since-id, max-id○ result type: mixed, recent, popular○ include entities● Paginated !○ you have to manage this by yourself
  • 19. REST API● Timelines● Tweets● Direct Messages● Friends & Followers● Users● Suggested Users● Favorites● Lists● Saved Searches● Places & Geo● Trends● Spam Reporting● OAuth● Help
  • 20. Streaming API● Persistent HTTP connection○ until you decide to close it● Could be reeeeaaaaaaally huge !○ Think about you architecture (hard and soft) !○ Separate storage and consumption● Only one stream opened at a time● Could be tricky to managed○ Use a library
  • 21. Streaming API endpoints groups● Public Streams○ GET statuses/sample○ POST statuses/filter○ GET statuses/firehose (limited access)● User Streams○ Data and events for a specific user● Site Streams (beta and limited access)○ Real time update for large number of users
  • 22. Twitter APIKeys for creating an awesome application !