SlideShare a Scribd company logo
Twitter APIs


Conectando ao pulso do planeta

Luis Cipriani
Developer & Platform Relations
@lfcipriani

@TwitterAds | Confidential
230M+
usuários ativos
!

500M+
tweets por dia
!

77%
dos usuários estão
fora dos EUA
	

	

	

2006	 	

	

	

	

	

!

	

	

	

	

	

	

	

	

	

	

	

2013

!

@TwitterAds | Confidential
Twitter é global, público
e em tempo real
Twitter é a distância mais curta entre você
(@) e o que te interessa mais (#)
!
!
Twitter está presente nos

eventos pelo mundo

@TwitterAds | Confidential
Usando a plataforma do Twitter 

nas suas aplicações

@TwitterAds | Confidential
Tweeting Badger

@TwitterAds | Confidential
#protestosSP #labic

@TwitterAds | Confidential
Votação da personalidade
do ano na VEJA
@TwitterAds | Confidential
#skyrec

@TwitterAds | Confidential
emojitracker
@TwitterAds | Confidential
As APIs do Twitter lidam com o 

agora e o que já aconteceu
APIs de Streaming fornecem o
que está acontecendo agora
APIs de Streaming fornecem o
que está acontecendo agora
POST

https://stream.twitter.com/1.1/statuses/filter.json

Dados: follow: 17346246

track: #cpbr7

locations: -23.5136,-46.6408,-23.5182,-46.63460	
language: pt-BR
APIs de Streaming fornecem o
que está acontecendo agora
GET

https://stream.twitter.com/1.1/statuses/sample.json

Retorna 1% de todos os dados da Firehose (estatiscamente relevante)
APIs de Streaming fornecem o
que está acontecendo agora
GET

https://stream.twitter.com/1.1/statuses/firehose.json

Retorna a Firehose em sua totalidade, requer contrato
APIs de Streaming fornecem o
que está acontecendo agora
{"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264085194330112,"id_str":"407264085194330112","text":"u201c@DM_Minions: The minion mobile! http://t.co/Tq8AQoXcVyu201d shall I get it, @CourtneyLouu ud83dude0fud83dude18","source":"u003ca
href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhoneu003c/au003e","truncated":false,"in_reply_to_status_id":407263303405023232,"in_reply_to_status_id_str":"407263303405023232","in_reply_to_user_id":
948825632,"in_reply_to_user_id_str":"948825632","in_reply_to_screen_name":"DM_Minions","user":{"id":404024178,"id_str":"404024178","name":"emilyjade","screen_name":"_emilyjade","location":"","url":null,"description":"'what is essential, is invisible to
the eye'","protected":false,"followers_count":156,"friends_count":287,"listed_count":0,"created_at":"Thu Nov 03 10:18:49 +0000 2011","favourites_count":379,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":
8506,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/
images/themes/theme7/bg.gif","profile_background_tile":false,"profile_image_url":"http://pbs.twimg.com/profile_images/378800000811908687/bc82e20db7c7812a1f61f72998f948e9_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/
profile_images/378800000811908687/bc82e20db7c7812a1f61f72998f948e9_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/404024178/
1385914936","profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":nul
l,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[51.35264663,-1.15710757]},"coordinates":{"type":"Point","coordinates":[-1.15710757,51.35264663]},"place":{"id":"d009bfdb11c20f3e","url":"https://api.twitter.com/
1.1/geo/id/d009bfdb11c20f3e.json","place_type":"city","name":"Basingstoke and Deane","full_name":"Basingstoke and Deane, Hampshire","country_code":"GB","country":"United Kingdom","contained_within":[],"bounding_box":{"type":"Polygon","coordinates":
[[[-1.4601689999999998,51.133537999999994],[-1.4601689999999998,51.383949],[-0.9748119999999999,51.383949],[-0.9748119999999999,51.133537999999994]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":
[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"DM_Minions","name":"DespicableMe Minions","id":948825632,"id_str":"948825632","indices":[1,12]},{"screen_name":"CourtneyLouu","name":"coourts","id":43456930,"id_str":"43456930","indices":
[73,86]}],"media":[{"id":407263303325335552,"id_str":"407263303325335552","indices":[33,55],"media_url":"http://pbs.twimg.com/media/Babj0QzCQAAMrX4.jpg","media_url_https":"https://pbs.twimg.com/media/Babj0QzCQAAMrX4.jpg","url":"http://t.co/
Tq8AQoXcVy","display_url":"pic.twitter.com/Tq8AQoXcVy","expanded_url":"http://twitter.com/DM_Minions/status/407263303405023232/photo/1","type":"photo","sizes":{"small":{"w":339,"h":236,"resize":"fit"},"large":{"w":958,"h":
666,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"medium":{"w":599,"h":417,"resize":"fit"}},"source_status_id":
407263303405023232,"source_status_id_str":"407263303405023232"}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"medium","lang":"en"}	
{"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264086347747328,"id_str":"407264086347747328","text":"@DannyArratoon already eaten it but you can bring me another one?","source":"u003ca href="http://twitter.com/download/iphone" rel=
"nofollow"u003eTwitter for iPhoneu003c/au003e","truncated":false,"in_reply_to_status_id":407263944844533761,"in_reply_to_status_id_str":"407263944844533761","in_reply_to_user_id":
210579473,"in_reply_to_user_id_str":"210579473","in_reply_to_screen_name":"DannyArratoon","user":{"id":
495068253,"id_str":"495068253","name":"eleanor","screen_name":"ell_eysselinck","location":"london","url":null,"description":null,"protected":false,"followers_count":430,"friends_count":345,"listed_count":0,"created_at":"Fri Feb 17 15:23:34 +0000
2012","favourites_count":3934,"utc_offset":0,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count":
7800,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http://a0.twimg.com/profile_background_images/635582704/
nud5dpj44ngj5bgv5k55.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/635582704/nud5dpj44ngj5bgv5k55.jpeg","profile_background_tile":true,"profile_image_url":"http://pbs.twimg.com/profile_images/
378800000812022272/b0218f45cb51525440be4f5782aaba6b_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/378800000812022272/b0218f45cb51525440be4f5782aaba6b_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/
profile_banners/495068253/
1378837388","profile_link_color":"EB091C","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":nul
l,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[51.37097685,-0.21992044]},"coordinates":{"type":"Point","coordinates":[-0.21992044,51.37097685]},"place":{"id":"8840213b5fc1032a","url":"https://api.twitter.com/
1.1/geo/id/8840213b5fc1032a.json","place_type":"city","name":"Sutton","full_name":"Sutton, London","country_code":"GB","country":"United Kingdom","contained_within":[],"bounding_box":{"type":"Polygon","coordinates":
[[[-0.24586899999999998,51.321324999999995],[-0.24586899999999998,51.393378999999996],[-0.117306,51.393378999999996],[-0.117306,51.321324999999995]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":
[],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"DannyArratoon","name":"Danny","id":210579473,"id_str":"210579473","indices":[0,14]}]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"}	
{"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264087085953025,"id_str":"407264087085953025","text":"@brontemaria22 #firstin","source":"u003ca href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhoneu003c/a
u003e","truncated":false,"in_reply_to_status_id":407262865251643392,"in_reply_to_status_id_str":"407262865251643392","in_reply_to_user_id":771468884,"in_reply_to_user_id_str":"771468884","in_reply_to_screen_name":"brontemaria22","user":{"id":
442104599,"id_str":"442104599","name":"zolf","screen_name":"FleurMarie32","location":"","url":null,"description":null,"protected":false,"followers_count":360,"friends_count":238,"listed_count":0,"created_at":"Tue Dec 20 19:13:40 +0000
2011","favourites_count":563,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count":
3092,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"BADFCD","profile_background_image_url":"http://a0.twimg.com/profile_background_images/622665567/
46ehgxq1mfildvuk2ots.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/622665567/46ehgxq1mfildvuk2ots.jpeg","profile_background_tile":true,"profile_image_url":"http://pbs.twimg.com/profile_images/
378800000689641927/ed04861205ea2348e935d4a0b0a198e5_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/378800000689641927/ed04861205ea2348e935d4a0b0a198e5_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/
profile_banners/442104599/
1383498191","profile_link_color":"FF0000","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":nul
l,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[51.24861223,0.06772169]},"coordinates":{"type":"Point","coordinates":[0.06772169,51.24861223]},"place":{"id":"5747f33800b71f4b","url":"https://api.twitter.com/1.1/
geo/id/5747f33800b71f4b.json","place_type":"city","name":"Sevenoaks","full_name":"Sevenoaks, Kent","country_code":"GB","country":"United Kingdom","contained_within":[],"bounding_box":{"type":"Polygon","coordinates":[[[0.033526,51.131789999999995],
[0.033526,51.417970999999994],[0.344761,51.417970999999994],[0.344761,51.131789999999995]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"firstin","indices":[15,23]}],"symbols":[],"urls":
[],"user_mentions":[{"screen_name":"brontemaria22","name":"bronteee","id":771468884,"id_str":"771468884","indices":[0,14]}]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"}	
{"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264087404707840,"id_str":"407264087404707840","text":"Totally forgot about all this stuff.","source":"u003ca href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhone
u003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":45353664,"id_str":"45353664","name":"Jay
Ferry","screen_name":"Jay_fezz","location":"London ","url":"http://www.facebook.com/jay_fezz","description":"Baker. Not A Candle Stick Maker. Im Perfectly Dysfunctional","protected":false,"followers_count":166,"friends_count":635,"listed_count":
24,"created_at":"Sun Jun 07 15:06:56 +0000 2009","favourites_count":56,"utc_offset":0,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count":
Tweet: 140 caracteres

~4KB de informação
{	
"created_at": "Wed Oct 02 15:53:43 +0000 2013",	
"id": 385432417126739968,	
"id_str": "385432417126739968",	
"text": "Learn more about the powerful #Linux container engine @docker in this video intro with @solomonstre - http://t.co/QJLdA1762Y @TwitterOSS",	
"source": "web",	
"truncated": false,	
"in_reply_to_status_id": null,	
"in_reply_to_status_id_str": null,	
"in_reply_to_user_id": null,	
"in_reply_to_user_id_str": null,	
"in_reply_to_screen_name": null,	
"user": {	
"id": 1665823832,	
"id_str": "1665823832",	
"name": "Twitter University",	
"screen_name": "university",	
"location": "",	
"description": "Building a culture of learning for @TwitterEng and the world at large",	
"url": "http://t.co/c8IHJLE1Y8",	
"entities": {	
"url": {	
"urls": [{	
"url": "http://t.co/c8IHJLE1Y8",	
"expanded_url": "http://youtube.com/twitteruniversity",	
"display_url": "youtube.com/twitteruniversu2026",	
"indices": [0, 22]	
}]
APIs REST permite executar ações

e acessar o que aconteceu
APIs REST permite executar ações

e acessar o que aconteceu
Tweets

GET statuses/show/:id
POST statuses/update

Timelines

GET
GET
GET

statuses/home_timeline
statuses/user_timeline
statuses/mentions_timeline

Busca

GET

search/tweets
…

Users, Favorites, Direct Messages, Followings & Followers,

Lists, Saved Searches, Trends, Geo, Spam Reporting
Bora codar! :)
#obrigado
!

Luis Cipriani
@lfcipriani

@TwitterDevBr
dev.twitter.com
@TwitterAds | Confidential
#referências
•
•
•
•
•
•
•
•
•

Twitter Developers: https://dev.twitter.com/
@oquevernaCP bot: http://lfcipriani.github.io/oquevernaCP/
Tweeting Badger: https://twitter.com/zootweetslive
#protestoSP: http://www.labic.net/cartografia-das-controversias/a-batalha-do-vinagre-por-que-o-protestospnao-teve-uma-mas-muitas-hashtags/
Personalidade do ano 2013: http://veja.abril.com.br/multimidia/infograficos/escolha-a-personalidade-do-ano
#skyrec: http://www.youtube.com/watch?v=MI_Hp32m1u4
Tweet-a-coffee: https://twitter.com/Tweetacoffee
Emojitracker: http://emojitracker.com/
Demétrius: https://twitter.com/search?q=%40DemasGNU%20cpbr7&src=typd&f=realtime

!

Imagens
!

•
•
•
•

Estádio Olímpico [Marcelo Druck]: http://www.flickr.com/photos/79992665@N00/7309421366/
RS 377 [Ronai Rocha]: http://www.flickr.com/photos/74137717@N00/2247004828/
Manifestação [Maria Objetiva]: http://www.flickr.com/photos/mariaobjetiva/8982057882
São Paulo skiline [Fernando Stankus]: http://www.flickr.com/photos/stankuns/3772102760

@TwitterAds | Confidential

More Related Content

PDF
Twitter APIs: Connecting to the Pulse of the Planet
KEY
Be A Civic Coder
PDF
A SaFar in the World of Selfies, Forwards, RTs, Likes, and Beyond
PDF
Twitter APIs: Se Connecter au Pouls de la Planète
PPTX
Jublia MICE Co-LAB 2014 Presentation
PDF
Case Study - How we got #ProKabaddi to trend on twitter in India on Pro Kabad...
PPTX
2 de versie 4de lesdag kindfactoren
PPT
Competing countries (flora)
Twitter APIs: Connecting to the Pulse of the Planet
Be A Civic Coder
A SaFar in the World of Selfies, Forwards, RTs, Likes, and Beyond
Twitter APIs: Se Connecter au Pouls de la Planète
Jublia MICE Co-LAB 2014 Presentation
Case Study - How we got #ProKabaddi to trend on twitter in India on Pro Kabad...
2 de versie 4de lesdag kindfactoren
Competing countries (flora)

Viewers also liked (20)

PPTX
Physics4999
PPT
Новейший обучающий курс по инвестированию
PPT
да славит
PDF
Color Illustrations
PDF
Chapter 13: UK Renewable Energy Policy since Privatization
PPT
Coventry
PDF
iTunesU: iGlue for iPad Learning
PPTX
2011 How to Prepare for the First Avenue Career & Grad School Fair
PDF
101 tips for the classroom
PDF
Fernale Villas Project Brief
PPT
Issr plodinec
PPSX
WRM-Presentation-EN
PDF
Social media pocket guide
PDF
Menager bosc2010 mobyle
PDF
Knowing your purpose in life lesson #4
PPTX
Intro to Drush
PPTX
Getting farming right : Reflections on ecological sustainability
PDF
Hobbyist level
PDF
Automating JFC UI application testing with Jemmy
PDF
Market Leadership by Scientific Online Community and Open Access
Physics4999
Новейший обучающий курс по инвестированию
да славит
Color Illustrations
Chapter 13: UK Renewable Energy Policy since Privatization
Coventry
iTunesU: iGlue for iPad Learning
2011 How to Prepare for the First Avenue Career & Grad School Fair
101 tips for the classroom
Fernale Villas Project Brief
Issr plodinec
WRM-Presentation-EN
Social media pocket guide
Menager bosc2010 mobyle
Knowing your purpose in life lesson #4
Intro to Drush
Getting farming right : Reflections on ecological sustainability
Hobbyist level
Automating JFC UI application testing with Jemmy
Market Leadership by Scientific Online Community and Open Access
Ad

More from Luis Cipriani (11)

PDF
Adventures with Raspberry Pi and Twitter API
PDF
Capturando o pulso do planeta com as APIs de Streaming do Twitter
PDF
Segurança de APIs HTTP, um guia sensato para desenvolvedores preocupados
PDF
API Caching, why your server needs some rest
PDF
Explaining A Programming Model for Context-Aware Applications in Large-Scale ...
PDF
Alexandria: um Sistema de Sistemas para Publicação de Conteúdo Digital utiliz...
PDF
Como um verdadeiro sistema REST funciona: arquitetura e performance na Abril
PDF
Explaining Semantic Web
PDF
Hbase: Introduction to column oriented databases
KEY
Case Abril: Tracking real time user behavior in websites Homes with Ruby, Sin...
KEY
Fearless HTTP requests abuse
Adventures with Raspberry Pi and Twitter API
Capturando o pulso do planeta com as APIs de Streaming do Twitter
Segurança de APIs HTTP, um guia sensato para desenvolvedores preocupados
API Caching, why your server needs some rest
Explaining A Programming Model for Context-Aware Applications in Large-Scale ...
Alexandria: um Sistema de Sistemas para Publicação de Conteúdo Digital utiliz...
Como um verdadeiro sistema REST funciona: arquitetura e performance na Abril
Explaining Semantic Web
Hbase: Introduction to column oriented databases
Case Abril: Tracking real time user behavior in websites Homes with Ruby, Sin...
Fearless HTTP requests abuse
Ad

Recently uploaded (20)

PDF
Why Endpoint Security Is Critical in a Remote Work Era?
PDF
Dell Pro 14 Plus: Be better prepared for what’s coming
PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
DevOps & Developer Experience Summer BBQ
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
PDF
Top Generative AI Tools for Patent Drafting in 2025.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
REPORT: Heating appliances market in Poland 2024
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
PPTX
CroxyProxy Instagram Access id login.pptx
PDF
creating-agentic-ai-solutions-leveraging-aws.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Doc9.....................................
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Why Endpoint Security Is Critical in a Remote Work Era?
Dell Pro 14 Plus: Be better prepared for what’s coming
Transforming Manufacturing operations through Intelligent Integrations
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
DevOps & Developer Experience Summer BBQ
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
Top Generative AI Tools for Patent Drafting in 2025.pdf
NewMind AI Weekly Chronicles - August'25 Week I
REPORT: Heating appliances market in Poland 2024
A Day in the Life of Location Data - Turning Where into How.pdf
CroxyProxy Instagram Access id login.pptx
creating-agentic-ai-solutions-leveraging-aws.pdf
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Doc9.....................................
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Enable Enterprise-Ready Security on IBM i Systems.pdf
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)

Twitter e suas APIs de Streaming - Campus Party Brasil 7

  • 1. Twitter APIs
 Conectando ao pulso do planeta Luis Cipriani Developer & Platform Relations @lfcipriani @TwitterAds | Confidential
  • 2. 230M+ usuários ativos ! 500M+ tweets por dia ! 77% dos usuários estão fora dos EUA 2006 ! 2013 ! @TwitterAds | Confidential
  • 3. Twitter é global, público e em tempo real
  • 4. Twitter é a distância mais curta entre você (@) e o que te interessa mais (#) ! !
  • 5. Twitter está presente nos
 eventos pelo mundo @TwitterAds | Confidential
  • 6. Usando a plataforma do Twitter 
 nas suas aplicações @TwitterAds | Confidential
  • 9. Votação da personalidade do ano na VEJA @TwitterAds | Confidential
  • 12. As APIs do Twitter lidam com o 
 agora e o que já aconteceu
  • 13. APIs de Streaming fornecem o que está acontecendo agora
  • 14. APIs de Streaming fornecem o que está acontecendo agora POST https://stream.twitter.com/1.1/statuses/filter.json Dados: follow: 17346246
 track: #cpbr7
 locations: -23.5136,-46.6408,-23.5182,-46.63460 language: pt-BR
  • 15. APIs de Streaming fornecem o que está acontecendo agora GET https://stream.twitter.com/1.1/statuses/sample.json Retorna 1% de todos os dados da Firehose (estatiscamente relevante)
  • 16. APIs de Streaming fornecem o que está acontecendo agora GET https://stream.twitter.com/1.1/statuses/firehose.json Retorna a Firehose em sua totalidade, requer contrato
  • 17. APIs de Streaming fornecem o que está acontecendo agora {"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264085194330112,"id_str":"407264085194330112","text":"u201c@DM_Minions: The minion mobile! http://t.co/Tq8AQoXcVyu201d shall I get it, @CourtneyLouu ud83dude0fud83dude18","source":"u003ca href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhoneu003c/au003e","truncated":false,"in_reply_to_status_id":407263303405023232,"in_reply_to_status_id_str":"407263303405023232","in_reply_to_user_id": 948825632,"in_reply_to_user_id_str":"948825632","in_reply_to_screen_name":"DM_Minions","user":{"id":404024178,"id_str":"404024178","name":"emilyjade","screen_name":"_emilyjade","location":"","url":null,"description":"'what is essential, is invisible to the eye'","protected":false,"followers_count":156,"friends_count":287,"listed_count":0,"created_at":"Thu Nov 03 10:18:49 +0000 2011","favourites_count":379,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count": 8506,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"EBEBEB","profile_background_image_url":"http://abs.twimg.com/images/themes/theme7/bg.gif","profile_background_image_url_https":"https://abs.twimg.com/ images/themes/theme7/bg.gif","profile_background_tile":false,"profile_image_url":"http://pbs.twimg.com/profile_images/378800000811908687/bc82e20db7c7812a1f61f72998f948e9_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/ profile_images/378800000811908687/bc82e20db7c7812a1f61f72998f948e9_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/profile_banners/404024178/ 1385914936","profile_link_color":"990000","profile_sidebar_border_color":"DFDFDF","profile_sidebar_fill_color":"F3F3F3","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":nul l,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[51.35264663,-1.15710757]},"coordinates":{"type":"Point","coordinates":[-1.15710757,51.35264663]},"place":{"id":"d009bfdb11c20f3e","url":"https://api.twitter.com/ 1.1/geo/id/d009bfdb11c20f3e.json","place_type":"city","name":"Basingstoke and Deane","full_name":"Basingstoke and Deane, Hampshire","country_code":"GB","country":"United Kingdom","contained_within":[],"bounding_box":{"type":"Polygon","coordinates": [[[-1.4601689999999998,51.133537999999994],[-1.4601689999999998,51.383949],[-0.9748119999999999,51.383949],[-0.9748119999999999,51.133537999999994]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags": [],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"DM_Minions","name":"DespicableMe Minions","id":948825632,"id_str":"948825632","indices":[1,12]},{"screen_name":"CourtneyLouu","name":"coourts","id":43456930,"id_str":"43456930","indices": [73,86]}],"media":[{"id":407263303325335552,"id_str":"407263303325335552","indices":[33,55],"media_url":"http://pbs.twimg.com/media/Babj0QzCQAAMrX4.jpg","media_url_https":"https://pbs.twimg.com/media/Babj0QzCQAAMrX4.jpg","url":"http://t.co/ Tq8AQoXcVy","display_url":"pic.twitter.com/Tq8AQoXcVy","expanded_url":"http://twitter.com/DM_Minions/status/407263303405023232/photo/1","type":"photo","sizes":{"small":{"w":339,"h":236,"resize":"fit"},"large":{"w":958,"h": 666,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"medium":{"w":599,"h":417,"resize":"fit"}},"source_status_id": 407263303405023232,"source_status_id_str":"407263303405023232"}]},"favorited":false,"retweeted":false,"possibly_sensitive":false,"filter_level":"medium","lang":"en"} {"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264086347747328,"id_str":"407264086347747328","text":"@DannyArratoon already eaten it but you can bring me another one?","source":"u003ca href="http://twitter.com/download/iphone" rel= "nofollow"u003eTwitter for iPhoneu003c/au003e","truncated":false,"in_reply_to_status_id":407263944844533761,"in_reply_to_status_id_str":"407263944844533761","in_reply_to_user_id": 210579473,"in_reply_to_user_id_str":"210579473","in_reply_to_screen_name":"DannyArratoon","user":{"id": 495068253,"id_str":"495068253","name":"eleanor","screen_name":"ell_eysselinck","location":"london","url":null,"description":null,"protected":false,"followers_count":430,"friends_count":345,"listed_count":0,"created_at":"Fri Feb 17 15:23:34 +0000 2012","favourites_count":3934,"utc_offset":0,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count": 7800,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"000000","profile_background_image_url":"http://a0.twimg.com/profile_background_images/635582704/ nud5dpj44ngj5bgv5k55.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/635582704/nud5dpj44ngj5bgv5k55.jpeg","profile_background_tile":true,"profile_image_url":"http://pbs.twimg.com/profile_images/ 378800000812022272/b0218f45cb51525440be4f5782aaba6b_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/378800000812022272/b0218f45cb51525440be4f5782aaba6b_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/ profile_banners/495068253/ 1378837388","profile_link_color":"EB091C","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":nul l,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[51.37097685,-0.21992044]},"coordinates":{"type":"Point","coordinates":[-0.21992044,51.37097685]},"place":{"id":"8840213b5fc1032a","url":"https://api.twitter.com/ 1.1/geo/id/8840213b5fc1032a.json","place_type":"city","name":"Sutton","full_name":"Sutton, London","country_code":"GB","country":"United Kingdom","contained_within":[],"bounding_box":{"type":"Polygon","coordinates": [[[-0.24586899999999998,51.321324999999995],[-0.24586899999999998,51.393378999999996],[-0.117306,51.393378999999996],[-0.117306,51.321324999999995]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags": [],"symbols":[],"urls":[],"user_mentions":[{"screen_name":"DannyArratoon","name":"Danny","id":210579473,"id_str":"210579473","indices":[0,14]}]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"} {"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264087085953025,"id_str":"407264087085953025","text":"@brontemaria22 #firstin","source":"u003ca href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhoneu003c/a u003e","truncated":false,"in_reply_to_status_id":407262865251643392,"in_reply_to_status_id_str":"407262865251643392","in_reply_to_user_id":771468884,"in_reply_to_user_id_str":"771468884","in_reply_to_screen_name":"brontemaria22","user":{"id": 442104599,"id_str":"442104599","name":"zolf","screen_name":"FleurMarie32","location":"","url":null,"description":null,"protected":false,"followers_count":360,"friends_count":238,"listed_count":0,"created_at":"Tue Dec 20 19:13:40 +0000 2011","favourites_count":563,"utc_offset":null,"time_zone":null,"geo_enabled":true,"verified":false,"statuses_count": 3092,"lang":"en","contributors_enabled":false,"is_translator":false,"profile_background_color":"BADFCD","profile_background_image_url":"http://a0.twimg.com/profile_background_images/622665567/ 46ehgxq1mfildvuk2ots.jpeg","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/622665567/46ehgxq1mfildvuk2ots.jpeg","profile_background_tile":true,"profile_image_url":"http://pbs.twimg.com/profile_images/ 378800000689641927/ed04861205ea2348e935d4a0b0a198e5_normal.jpeg","profile_image_url_https":"https://pbs.twimg.com/profile_images/378800000689641927/ed04861205ea2348e935d4a0b0a198e5_normal.jpeg","profile_banner_url":"https://pbs.twimg.com/ profile_banners/442104599/ 1383498191","profile_link_color":"FF0000","profile_sidebar_border_color":"F2E195","profile_sidebar_fill_color":"FFF7CC","profile_text_color":"0C3E53","profile_use_background_image":true,"default_profile":false,"default_profile_image":false,"following":nul l,"follow_request_sent":null,"notifications":null},"geo":{"type":"Point","coordinates":[51.24861223,0.06772169]},"coordinates":{"type":"Point","coordinates":[0.06772169,51.24861223]},"place":{"id":"5747f33800b71f4b","url":"https://api.twitter.com/1.1/ geo/id/5747f33800b71f4b.json","place_type":"city","name":"Sevenoaks","full_name":"Sevenoaks, Kent","country_code":"GB","country":"United Kingdom","contained_within":[],"bounding_box":{"type":"Polygon","coordinates":[[[0.033526,51.131789999999995], [0.033526,51.417970999999994],[0.344761,51.417970999999994],[0.344761,51.131789999999995]]]},"attributes":{}},"contributors":null,"retweet_count":0,"favorite_count":0,"entities":{"hashtags":[{"text":"firstin","indices":[15,23]}],"symbols":[],"urls": [],"user_mentions":[{"screen_name":"brontemaria22","name":"bronteee","id":771468884,"id_str":"771468884","indices":[0,14]}]},"favorited":false,"retweeted":false,"filter_level":"medium","lang":"en"} {"created_at":"Sun Dec 01 21:44:59 +0000 2013","id":407264087404707840,"id_str":"407264087404707840","text":"Totally forgot about all this stuff.","source":"u003ca href="http://twitter.com/download/iphone" rel="nofollow"u003eTwitter for iPhone u003c/au003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":45353664,"id_str":"45353664","name":"Jay Ferry","screen_name":"Jay_fezz","location":"London ","url":"http://www.facebook.com/jay_fezz","description":"Baker. Not A Candle Stick Maker. Im Perfectly Dysfunctional","protected":false,"followers_count":166,"friends_count":635,"listed_count": 24,"created_at":"Sun Jun 07 15:06:56 +0000 2009","favourites_count":56,"utc_offset":0,"time_zone":"London","geo_enabled":true,"verified":false,"statuses_count":
  • 18. Tweet: 140 caracteres
 ~4KB de informação { "created_at": "Wed Oct 02 15:53:43 +0000 2013", "id": 385432417126739968, "id_str": "385432417126739968", "text": "Learn more about the powerful #Linux container engine @docker in this video intro with @solomonstre - http://t.co/QJLdA1762Y @TwitterOSS", "source": "web", "truncated": false, "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": { "id": 1665823832, "id_str": "1665823832", "name": "Twitter University", "screen_name": "university", "location": "", "description": "Building a culture of learning for @TwitterEng and the world at large", "url": "http://t.co/c8IHJLE1Y8", "entities": { "url": { "urls": [{ "url": "http://t.co/c8IHJLE1Y8", "expanded_url": "http://youtube.com/twitteruniversity", "display_url": "youtube.com/twitteruniversu2026", "indices": [0, 22] }]
  • 19. APIs REST permite executar ações
 e acessar o que aconteceu
  • 20. APIs REST permite executar ações
 e acessar o que aconteceu Tweets GET statuses/show/:id POST statuses/update Timelines GET GET GET statuses/home_timeline statuses/user_timeline statuses/mentions_timeline Busca GET search/tweets … Users, Favorites, Direct Messages, Followings & Followers,
 Lists, Saved Searches, Trends, Geo, Spam Reporting
  • 23. #referências • • • • • • • • • Twitter Developers: https://dev.twitter.com/ @oquevernaCP bot: http://lfcipriani.github.io/oquevernaCP/ Tweeting Badger: https://twitter.com/zootweetslive #protestoSP: http://www.labic.net/cartografia-das-controversias/a-batalha-do-vinagre-por-que-o-protestospnao-teve-uma-mas-muitas-hashtags/ Personalidade do ano 2013: http://veja.abril.com.br/multimidia/infograficos/escolha-a-personalidade-do-ano #skyrec: http://www.youtube.com/watch?v=MI_Hp32m1u4 Tweet-a-coffee: https://twitter.com/Tweetacoffee Emojitracker: http://emojitracker.com/ Demétrius: https://twitter.com/search?q=%40DemasGNU%20cpbr7&src=typd&f=realtime ! Imagens ! • • • • Estádio Olímpico [Marcelo Druck]: http://www.flickr.com/photos/79992665@N00/7309421366/ RS 377 [Ronai Rocha]: http://www.flickr.com/photos/74137717@N00/2247004828/ Manifestação [Maria Objetiva]: http://www.flickr.com/photos/mariaobjetiva/8982057882 São Paulo skiline [Fernando Stankus]: http://www.flickr.com/photos/stankuns/3772102760 @TwitterAds | Confidential