SlideShare a Scribd company logo
Twitter API, Streaming
and SharePoint 2013


This is Larry!
DEMO
Realizing a live twitter wall with twitterizer and put it on a SharePoint
                               2013 page.
Twitter API, Streaming and SharePoint 2013
About me
• 25
• SharePoint
  • Web dev
  • Consulting
• @hupseb
• Employed at            - alegri.eu
• sharepoint.stackexchange.com
• No blog yet  Working on it... ;)
• Foundation year: 2001
• 225 employees (DACH region)
• 8 locations
• One of the biggest Microsoft-
  and Unite- (SAP & Microsoft)
  partners in Germany
• 60+ of DAX 100 companies
  are our costumers
• Consulting Excellence in Microsoft
  Enterprise Solutions
• Alegri.eu
Twitter
• Social networking and
  microblogging service
• Founded 2006 by Jack Dorsey
• Amount of users grows and
  grows and...
   • End of 2011 – 100 million
   • March 2013 – 1200 million
• 340 million tweets daily
• 1.6 billion search queries per
  day
• business.twitter.com
Why you should use it!




              Scott Hanselman reads my tweet!
DEMO
Put the twitter widget into a SharePoint 2013 page.
Twitter API, Streaming and SharePoint 2013
The twitter APIs - overview
• REST APIs – (Representational State Transfer)
  • Search API
  • REST API v.1.1 (v.1 depricated – blackout tests running)
  • In pipeline to unify
     • Parameters (count vs. page and rpp)
     • Object differences
  • Poll-based system / pseudo real-time
• Streaming API
  • Supports long-lived connections on a different architecture
  • Real-time delivery of tweets
How to search for tweets
• Search API
  • http://search.twitter.com/search.json?q=twitter
  • Non authentication possible
  • Very limited

• REST API v.1.1
  • https://api.twitter.com/1.1/search/tweets.json
  • Authentication required
     • More queries
     • Better Limits
Differences between Streaming and REST




                           © dev.twitter.com
Differences between Streaming and
REST




                             © dev.twitter.com
Streaming API
• Streamed via HTTP
• Three streams
   • Public stream
   • User stream
   • Site stream
• Firehose
   • Attaching to ALL tweets worldwide
   • Only for Twitter partners
   • http://gnip.com/twitter/  Premium twitter streams
• no official volume limit
• 400 track keywords, 5,000 follow userids and 25 0.1-360 degree
  location boxes
Architecture of TwitterSky
1. SignalR hub initializes

                     2. Use Twitterizer to attach
                     to Twitter streaming API


                                           5. Asynchronous notification
                                           of new tweets
                                                                                        4. Answer each
           6. Pushes tweet to                                                           tweet as a chunk
           the connected
           clients                                                 3. Authenticate to
                                                                   twitter
                                                                   Streaming API
                                                                   via oAuth.




      7. Client renders the tweets
CODE
Let‘s talk about the code ;) Bits and bytes!
Limits, limits, limits...
•   Direct messages: 250 per day
•   Tweets: 1,000 per day
•   Changes to account email: 4 per hour
•   Following: 1,000 per day + aggressive follower block
•   Following (account-based): Once an account is following 2,000 more
    follower are needed to follow more people.

• Reading request from applications:
     • 150 unauthenticated per hour per IP
     • Authenticated depends on method that is called:
        • https://dev.twitter.com/docs/rate-limiting/1.1
        • https://dev.twitter.com/docs/rate-limiting/1.1/limits
... limits, limits... limits!
• X-Rate-Limit-Limit:
     rate limit ceiling for current request
• X-Rate-Limit-Remaining:
     number of requests left
• X-Rate-Limit-Reset:
     the remaining time window before reset
Sources
•   https://dev.twitter.com/docs/things-every-developer-should-know
•   http://speakinghacks.com/
•   https://dev.twitter.com/docs
•   https://github.com/Twitterizer/Twitterizer
•   http://twopcharts.com/twitter1billion.php
•   http://mashable.com/2009/11/02/twitter-lists-guide/



• @TwitterEng, @twitter, @twitterapi
Twitter API, Streaming and SharePoint 2013
Thank you...
  ... see you next time! ;)
Search API
• Just two methods search and trends.
• Parameters to create advanced searches: location, language,
  tweets to/about/from specific users, more.
• Retrieve trends, find out what´s hot on twitter programmatically.
REST API v.1.1
• 87 methods mirroring nearly all of twitter's user-facing features
• Returns XML or JSON for all methods, RSS and ATOM for
  methods that return timelines.
• Supports JSON callbacks, a variety of parameters to slice 'n
  dice.
• Meaningful use of HTTP response codes, plus explanatory error
  messages in the requested format.
Goodies – hotkeys I
• Aktionen                  • Navigation

N       Neuer Tweet         ?     Hilfe
F       Favorisieren        J     Nächster Tweet
R       Antworten           K     Vorheriger Tweet
T       Retweeten           Space Zum Seitenende
M       Direktnachricht     /     Suche
B       Nutzer blockieren   .     Neue Tweets laden
U       Nutzer entblocken
Enter   Details
L       Alle schließen
Goodies – hotkeys II
• Timelines

GH   Startseite    GF    Favoriten
GC   Verbinden     GL    Listen
GA   Aktivität     GM    Nachrichten
GR   Erwähnungen   GS    Einstellungen
GD   Entdecken     GU     Gehe zu
GP   Profil        Benutzer...

GF   Favoriten

More Related Content

PPTX
Development of Twitter Application #1 - Overview
PPTX
Development of Twitter Application #8 - Streaming API
KEY
Twitter API 2.0
PDF
20130504 - FeWeb - Twitter API
PDF
Facebook & Twitter API
PPTX
WARNINGBIRD: A NEAR REAL-TIME DETECTION SYSTEM FOR SUSPICIOUS URLS IN TWITTER...
PDF
Warningbird
PPTX
Detection of Phishing Websites
Development of Twitter Application #1 - Overview
Development of Twitter Application #8 - Streaming API
Twitter API 2.0
20130504 - FeWeb - Twitter API
Facebook & Twitter API
WARNINGBIRD: A NEAR REAL-TIME DETECTION SYSTEM FOR SUSPICIOUS URLS IN TWITTER...
Warningbird
Detection of Phishing Websites

What's hot (7)

PPT
Integrating RSS Into Your Web Site
PPTX
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
PPTX
Using & Abusing APIs: An Examination of the API Attack Surface
PPTX
Twitter API & OAuth 101 TVUG October 2009
PDF
B 3 line bot live coding
PDF
Protecting Your APIs Against Attack & Hijack
PPT
Howtwitter works
Integrating RSS Into Your Web Site
Why API Security Is More Complicated Than You Think (and Why It’s Your #1 Pri...
Using & Abusing APIs: An Examination of the API Attack Surface
Twitter API & OAuth 101 TVUG October 2009
B 3 line bot live coding
Protecting Your APIs Against Attack & Hijack
Howtwitter works
Ad

Viewers also liked (7)

PDF
Identifying actionable messages on social media
ODP
R-Users Group JSON and ReST Introduction using Twitter
PPTX
Introduction to software that can be used to capture and analyse Twitter data
PPTX
Twitter api
PDF
The Art of Social Media Analysis with Twitter & Python
PDF
REST to RESTful Web Service
PPT
Social media analysis in R using twitter API
Identifying actionable messages on social media
R-Users Group JSON and ReST Introduction using Twitter
Introduction to software that can be used to capture and analyse Twitter data
Twitter api
The Art of Social Media Analysis with Twitter & Python
REST to RESTful Web Service
Social media analysis in R using twitter API
Ad

Similar to Twitter API, Streaming and SharePoint 2013 (20)

PDF
500Startups @ Twitter
PDF
Twitter for CS10 @ Berkeley (Spring 2011)
PDF
Twitter Meetup at the Hacker Dojo
PPTX
Mz twitter-1.1-sdl
PPTX
HATEOAS 101 - Opinionated Introduction to a REST API Style
PDF
Intro to developing for @twitterapi
KEY
Intro to developing for @twitterapi (updated)
PDF
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
PDF
iPhoneアプリのTwitter連携
PDF
Programming to the Twitter API: ReTweeter
PDF
20131008 - Wajug - TweetWall Pro
PDF
Twitter Platform 2013
PPT
what is-twitter
ODP
Twitter
PPT
Twitter API Trends (Pubcon 2009)
 
PPTX
Twitter Update for Social Developers London - March 2013
PPTX
Twitter Presentation
PPTX
Twitter Presentation
KEY
Twitter Streaming API
PDF
Developing for @twitterapi (Techcrunch Disrupt Hackathon)
500Startups @ Twitter
Twitter for CS10 @ Berkeley (Spring 2011)
Twitter Meetup at the Hacker Dojo
Mz twitter-1.1-sdl
HATEOAS 101 - Opinionated Introduction to a REST API Style
Intro to developing for @twitterapi
Intro to developing for @twitterapi (updated)
Twitter - Guest Lecture UC Berkeley CS10 Fall 2010
iPhoneアプリのTwitter連携
Programming to the Twitter API: ReTweeter
20131008 - Wajug - TweetWall Pro
Twitter Platform 2013
what is-twitter
Twitter
Twitter API Trends (Pubcon 2009)
 
Twitter Update for Social Developers London - March 2013
Twitter Presentation
Twitter Presentation
Twitter Streaming API
Developing for @twitterapi (Techcrunch Disrupt Hackathon)

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
20250228 LYD VKU AI Blended-Learning.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
Unlocking AI with Model Context Protocol (MCP)
MYSQL Presentation for SQL database connectivity
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Twitter API, Streaming and SharePoint 2013

  • 1. Twitter API, Streaming and SharePoint 2013 This is Larry!
  • 2. DEMO Realizing a live twitter wall with twitterizer and put it on a SharePoint 2013 page.
  • 4. About me • 25 • SharePoint • Web dev • Consulting • @hupseb • Employed at - alegri.eu • sharepoint.stackexchange.com • No blog yet  Working on it... ;)
  • 5. • Foundation year: 2001 • 225 employees (DACH region) • 8 locations • One of the biggest Microsoft- and Unite- (SAP & Microsoft) partners in Germany • 60+ of DAX 100 companies are our costumers • Consulting Excellence in Microsoft Enterprise Solutions • Alegri.eu
  • 6. Twitter • Social networking and microblogging service • Founded 2006 by Jack Dorsey • Amount of users grows and grows and... • End of 2011 – 100 million • March 2013 – 1200 million • 340 million tweets daily • 1.6 billion search queries per day • business.twitter.com
  • 7. Why you should use it! Scott Hanselman reads my tweet!
  • 8. DEMO Put the twitter widget into a SharePoint 2013 page.
  • 10. The twitter APIs - overview • REST APIs – (Representational State Transfer) • Search API • REST API v.1.1 (v.1 depricated – blackout tests running) • In pipeline to unify • Parameters (count vs. page and rpp) • Object differences • Poll-based system / pseudo real-time • Streaming API • Supports long-lived connections on a different architecture • Real-time delivery of tweets
  • 11. How to search for tweets • Search API • http://search.twitter.com/search.json?q=twitter • Non authentication possible • Very limited • REST API v.1.1 • https://api.twitter.com/1.1/search/tweets.json • Authentication required • More queries • Better Limits
  • 12. Differences between Streaming and REST © dev.twitter.com
  • 13. Differences between Streaming and REST © dev.twitter.com
  • 14. Streaming API • Streamed via HTTP • Three streams • Public stream • User stream • Site stream • Firehose • Attaching to ALL tweets worldwide • Only for Twitter partners • http://gnip.com/twitter/  Premium twitter streams • no official volume limit • 400 track keywords, 5,000 follow userids and 25 0.1-360 degree location boxes
  • 15. Architecture of TwitterSky 1. SignalR hub initializes 2. Use Twitterizer to attach to Twitter streaming API 5. Asynchronous notification of new tweets 4. Answer each 6. Pushes tweet to tweet as a chunk the connected clients 3. Authenticate to twitter Streaming API via oAuth. 7. Client renders the tweets
  • 16. CODE Let‘s talk about the code ;) Bits and bytes!
  • 17. Limits, limits, limits... • Direct messages: 250 per day • Tweets: 1,000 per day • Changes to account email: 4 per hour • Following: 1,000 per day + aggressive follower block • Following (account-based): Once an account is following 2,000 more follower are needed to follow more people. • Reading request from applications: • 150 unauthenticated per hour per IP • Authenticated depends on method that is called: • https://dev.twitter.com/docs/rate-limiting/1.1 • https://dev.twitter.com/docs/rate-limiting/1.1/limits
  • 18. ... limits, limits... limits! • X-Rate-Limit-Limit: rate limit ceiling for current request • X-Rate-Limit-Remaining: number of requests left • X-Rate-Limit-Reset: the remaining time window before reset
  • 19. Sources • https://dev.twitter.com/docs/things-every-developer-should-know • http://speakinghacks.com/ • https://dev.twitter.com/docs • https://github.com/Twitterizer/Twitterizer • http://twopcharts.com/twitter1billion.php • http://mashable.com/2009/11/02/twitter-lists-guide/ • @TwitterEng, @twitter, @twitterapi
  • 21. Thank you... ... see you next time! ;)
  • 22. Search API • Just two methods search and trends. • Parameters to create advanced searches: location, language, tweets to/about/from specific users, more. • Retrieve trends, find out what´s hot on twitter programmatically.
  • 23. REST API v.1.1 • 87 methods mirroring nearly all of twitter's user-facing features • Returns XML or JSON for all methods, RSS and ATOM for methods that return timelines. • Supports JSON callbacks, a variety of parameters to slice 'n dice. • Meaningful use of HTTP response codes, plus explanatory error messages in the requested format.
  • 24. Goodies – hotkeys I • Aktionen • Navigation N Neuer Tweet ? Hilfe F Favorisieren J Nächster Tweet R Antworten K Vorheriger Tweet T Retweeten Space Zum Seitenende M Direktnachricht / Suche B Nutzer blockieren . Neue Tweets laden U Nutzer entblocken Enter Details L Alle schließen
  • 25. Goodies – hotkeys II • Timelines GH Startseite GF Favoriten GC Verbinden GL Listen GA Aktivität GM Nachrichten GR Erwähnungen GS Einstellungen GD Entdecken GU Gehe zu GP Profil Benutzer... GF Favoriten

Editor's Notes

  • #3: 5-10 minutes:
  • #5: Stamme aus der Nähe von Nürnberg, hoffe mein Dialekt nehmt ihr mich nicht allzu übelEntwickle SharePoint Lösungen, in letzter Zeit überwiegend in real-time mit Signal-R, knockoutjs…Alegri -> Stand mit Redbull hinweisenDie Dosen in den Goodie bags sind von uns ;)Ja ich arbeite im Moment an einem Blog… der ist noch nicht ganz fertig, aber in naher Zukunft wird es was.
  • #7: Frage: Wer kennt den User mit den meisten Followern?  Justin Bieber, 36.89 million… Danach kommt Lady Gaga und unter den Top 10 ist auch Barack ObamaWie macht Twitter Geld?Im Jahre 2008 hatte Twitter noch UmsatzproblemeSpäter kam Verkauf von sponsored links dazu.Tweets werden dort plaziert wo sie gesucht werden sollen.0,30 Cent per new FollowerFotograf für DJs (Liveveranstaltungen) hat somit 1300 Follower gewonnen und konnte Businnes startenHeute gibt es Webseiten, die den Wert deinen Twitter Accounts messen http://www.tweetvalue.net/Im Jahre 2014 soll Twitter 1 Millarden US dollar Wert sein.
  • #8: Eventbenachrichtigungen aus erster Hand: - Rackspace Webinars von Todd-Klindt - Neue Community Veranstaltungen (z.B. Anmeldung für das ShareCamp 2013 oder Usergroup) - David Fowler Entwicklungsstand zu SignalR - Neue ZertifikateHeißer Draht zu Experten: - Sie antworten auch, denn sie bekommen notifications (siehe Bild)An Clipboard malen:News sind schnell in das Unternehmen gebracht: - #yam - Autoforward to Facebook
  • #9: 5-10 minutes:Open the warmed up team siteRemove the newsfeed and and add the embedded code from twitterAaaaaaaaaaaaaaaaaaaaaaaaaaah omg it‘s not working for SharePoint 2013!!!First do it with notepadShow that the „src="http://platform.twitter.com/widgets.js" mattersShow that type="text/javascript„ mattersShow the central administration  Security  Manage web part securityIn case if you want to refuse people adding curstom javascriptShow dark themehow additional customizing options like width and height- data-theme="dark"
  • #11: Twitter API besteht aus drei Teilen: - Zwei REST APIs - Erster Blackout test On March 5th, 2013, from around 9:00am to 10:00am PST - Einer Streaming API - Historischer Zukauf von Search APISeit März 2013 version 1. deprecated und version 1.1: - Viele Quellen langen sich nur mit einer Authentifizierung (Oauth) ansteueren - Sogar die Help lässt nur mit Authentifizierung auslesen - Einzige nicht authentifizierungswürdige Quelle ist der Request nach eiem Oauth Token https://dev.twitter.com/docs/api/1/post/oauth/request_tokenSearch API: - Just two methods search and trends. - Parameters to create advanced searches: location, language, tweets to/about/from specific users, more. - Retrieve trends, find out what´s hot on twitter programmaticallyREST API v.1.1: - 87 methods mirroring nearly all of twitter's user-facing features - Returns XML or JSON for all methods, RSS and ATOM for methods that return timelines. - Supports JSON callbacks, a variety of parameters to slice 'n dice. - Meaningful use of HTTP response codes, plus explanatory error messages in the requested format.
  • #12: Search is focused in relevance and not completeness. Tweets of some users can be missing1000 maximum querySearch API – very limited - only 15 tweets returnedhttps://dev.twitter.com/docs/using-searchWith page=10 and rpp=150REST API v.1.1 - https://dev.twitter.com/docs/api/1.1/get/search/tweets
  • #17: <iframe width="100%" height="100%​" src="http://192.168.1.100/twittersky" frameborder="0" allowfullscreen></iframe>Zeigenwie man esalsiframeeinbindenkann auf leererWikiseiteZeigen,dass die iframeEinstellungen auf “… don’t permit sein muss
  • #18: If an application using the REST API says you have been rate limited you can still you the web site or the mobile applications to update your status.Quellen:https://support.twitter.com/articles/15364https://support.twitter.com/articles/160385https://dev.twitter.com/docs/things-every-developer-should-know
  • #19: An Clipboard malen:If user A launches application Z, and app Z makes 10 calls to user A’s mention timeline in a 15 minute window, then app Z has 5 calls left to make for that windowThen user A launches application X, and app X calls user A’s mention timeline 3 times, then app X has 12 calls left for that windowThe remaining value of calls on application X is isolated from application Z’s, despite the same user A
  • #23: Quellen:https://dev.twitter.com/docs/using-search
  • #24: Allows developers to access core dataUpdate time linesUpdate status dataUpdate user informationQuellen:https://dev.twitter.com/docs/api/1.1