![Page 1: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/1.jpg)
Hackeando o Twitter e o Facebook com Python
@fmasanori TI no Vale
http://www.slideshare.net/fmasanori
![Page 2: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/2.jpg)
Agenda (Python 2.7)
• Python vale a pena
• JSON killer module
• Twitter Client
• Facebook Hacking
• Reddit & MongoDB (se der tempo)
• Propaganda
• Perguntas
![Page 3: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/3.jpg)
![Page 4: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/4.jpg)
Python: cases de sucesso
![Page 5: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/5.jpg)
Python: cases de sucesso
![Page 6: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/6.jpg)
Python: cases de sucesso
![Page 7: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/7.jpg)
Python: cases de sucesso
![Page 8: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/8.jpg)
Python: cases de sucesso
![Page 9: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/9.jpg)
Python: quem usa
![Page 10: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/10.jpg)
Python: quem usa
![Page 11: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/11.jpg)
Python: quem usa
![Page 12: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/12.jpg)
Python: quem usa em SJC
![Page 13: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/13.jpg)
Github e StackOverflow
![Page 14: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/14.jpg)
Job Trends Indeed.com
![Page 15: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/15.jpg)
Language of the year 2007 and 2010
![Page 16: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/16.jpg)
Melhora da auto estima do aluno
![Page 17: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/17.jpg)
Tempo para ser produtivo
C 2 a Java 6 m Python 1 m
![Page 18: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/18.jpg)
JSON killer module
![Page 19: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/19.jpg)
JavaScript Object Notation
• http://json.org/
• Independente de linguagem
• Pares nome/valor
• Lista ordenada
• Muito adotado atualmente
• Alternativa para o XML – XML mais verbosa
– XML menor legibilidade
![Page 20: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/20.jpg)
Twitter Client
![Page 21: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/21.jpg)
Twitter Client
![Page 22: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/22.jpg)
Twitter Client
![Page 23: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/23.jpg)
Sentiment Analysis
menina1: aaaaaaaaaaaaaaaaaaa eu NAO GOSTO DELE
menina2: e vc ficará rica , e irá dividir sua
riqueza cm sua amg aq *u*
menina1: kkkkkk como assim eu fikar rica pq ??
menina2: pq ele é inteligente , e vai arranjar
um ótimo emprego , e ganhar mt dinheiro rs
menina1: kkkkk ele é inteligente como assim ??
menina2: AQUELE VIADO PASSOU NO CASDINHO , E EU
NAO !
![Page 25: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/25.jpg)
Twitter Trending Topics
![Page 26: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/26.jpg)
Twitter Trending Topics
https://gist.github.com/4121001
(by Bruno Rocha)
![Page 27: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/27.jpg)
Twitter Trending Topics
![Page 28: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/28.jpg)
Facebook Hacking
![Page 29: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/29.jpg)
Hackers não são “do mal”?
![Page 30: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/30.jpg)
“O Facebook é dirigido por hackers. A maioria das pessoas pensa de um hacker como alguém que invade um sistema de computador. Mas nós vemos isso como uma filosofia. Aqui, os hackers assumem que sempre há uma maneira melhor, mais eficiente de resolver problemas.” facebook.com/careers
![Page 31: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/31.jpg)
graph.facebook.com
![Page 32: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/32.jpg)
graph.facebook.com
https://gist.github.com/4121690
![Page 33: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/33.jpg)
Facebook profile
![Page 34: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/34.jpg)
Facebook profile photo
![Page 35: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/35.jpg)
Facebook Graph API
• https://graph.facebook.com
• Objetos JSON
• Links autenticados
• Obs.: access_token expira
• Autenticar novamente neste caso
![Page 36: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/36.jpg)
Facebook Friends
![Page 38: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/38.jpg)
Android Wallpaper
![Page 39: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/39.jpg)
Android Wallpaper
![Page 40: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/40.jpg)
TI no Vale: participantes
• Hackear participantes a partir do evento criado no Facebook
• Cruzar com a lista de presentes
• Inserir link para o perfil pessoal no Facebook
• Obs.: somente alguns participantes e com a foto na data do evento
![Page 41: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/41.jpg)
![Page 42: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/42.jpg)
Reddit + MongoDB client
![Page 43: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/43.jpg)
Reddit client
https://gist.github.com/4126108
(by 10gen)
![Page 44: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/44.jpg)
Reddit client
![Page 45: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/45.jpg)
MongoDB == JSON
Flexible Schema
![Page 46: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/46.jpg)
Relational DB
![Page 47: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/47.jpg)
Reddit MongoDB client
https://gist.github.com/4126471
![Page 48: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/48.jpg)
Reddit MongoDB client
![Page 49: Hackeando o Facebook e o Twitter com Python TI no Vale](https://reader033.vdocument.in/reader033/viewer/2022050922/557baebad8b42aa6638b4c53/html5/thumbnails/49.jpg)
Propaganda
Hackeando o Facebook e o Twitter com Python 01-fev 10h-12h