Overview of Twitter API Nathan Liu. Twitter API Essentials Twitter API is a Representational State Transfer(REST) style web services exposed over HTTP(S).

Slides:



Advertisements
Similar presentations
Andrew Newbigging Vice President, Integrations Development
Advertisements

MY NCBI (module 4.5). MODULE 4.5 PubMed/How to Use MY NCBI Instructions - This part of the: course is a PowerPoint demonstration intended to introduce.
MY NCBI (module 4.5). MODULE 4.5 PubMed/How to Use MY NCBI Instructions - This part of the: course is a PowerPoint demonstration intended to introduce.
MY NCBI (module 4.5). MODULE 4.5 PubMed/How to Use MY NCBI Instructions - This part of the: course is a PowerPoint demonstration intended to introduce.
The EBSCONET Subscription Management System is a multi-lingual
Twitter for Teachers Getting Started. Why should teachers use Twitter? Twitter might be the quickest and best method to acquire and maintain the relevance.
Representational State Transfer (REST): Representing Information in Web 2.0 Applications this is the presentation Emilio F Zegarra CS 2650.
Building and using REST information services Rion Dooley.
LiNC Developer Meetup Welcome!. Our job is to make your life easier APIs Tools and workflow Documentation Stay in touch: developers.lithium.com Join the.
Catalog REST for data providers ECHO Technical Interchange 04/30/13 3:15pm EST Doug Newman.
Using the Self Service BMC Helpdesk
Authentication Simon Cross Partner Engineer facebook.com/sicross An Overview.
OAuth 2.0 By “PJ” (JP on meetup.com) iOS and PHP developer, and occasional lawyer Contact me via:
Presenter: James Huang Date: Sept. 29,  HTTP and WWW  Bottle Web Framework  Request Routing  Sending Static Files  Handling HTML  HTTP Errors.
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences Facebook API Teppo Räisänen
Building RESTful Interfaces
1Proprietary and Confidential AirVantage API – Getting started David SCIAMMA – June 13th 2014.
Using Evernote and Google Docs in your web or mobile application (and potentially Dropbox and Skydrive) By Peter Messenger Senior Developer – Triple Point.
Introduction to Computing Using Python CSC Winter 2013 Week 8: WWW and Search  World Wide Web  Python Modules for WWW  Web Crawling  Thursday:
21 Recipes for Mining Twitter [Social Network Analysis] Hoon-Young Jung.
Twitter The Basics. What is Twitter? Tweets are: 140 characters or less Quick to follow and view updates Used to share links, photos, videos, music,hot.
With jQuery and AJAX Doncho Minkov Telerik Corporation Technical Trainer.
© 2012 Cisco and/or its affiliates. All rights reserved. Presentation_ID Cisco Public Quad APIs and SDK Preview Sachin Smotra Product Manger, Enterprise.
The project Information Retrieval A.A P. Ferragina – Dipartimento di Informatica, University of Pisa –
Microsoft ® Official Course Interacting with the Search Service Microsoft SharePoint 2013 SharePoint Practice.
With jQuery and AJAX Doncho Minkov Telerik Corporation Technical Trainer.
Web Services 101 James Payne Managing Director for New Media / Advancement July 30, 2013.
Online real-time tweets extraction, mapping and dissemination Xiannian Chen and Gregory Elmes West Virginia University Chen & West Virginia University2014.
HTRC API Overview Yiming Sun. HTRC Architecture Data API Portal access Direct programmatic access (by programs running on HTRC machines) Security (OAuth2)
Twitter.  Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
Python and REST Kevin Hibma. What is REST? Why REST? REST stands for Representational State Transfer. (It is sometimes spelled "ReST".) It relies on a.
Open Data Protocol * Han Wang 11/30/2012 *
TWITTER DAY /07/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University.
RESTful Web Service 2014 년 12 월 한연희
DM_PPT_NP_v01 SESIP_0715_JR HDF Server HDF for the Web John Readey The HDF Group Champaign Illinois USA.
Twitter 101. What is Twitter? Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
Facebook API Kelly Orser. Client Libraries Client libraries will simplify the calls to the platform by reducing the amount of code you have to write.
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Jason Platts Lead Technical Developer The Open University An overview of how the Open University has incorporated bibliographic.
ICM – API Server & Forms Gary Ratcliffe.
Powered by iPlant Consuming iPlant Services in Your Portals.
Lab #3: Programming Exercises for Social Web APIs By J. H. Wang Dec. 26, 2011.
Virtual techdays INDIA │ November 2010 Integrating Social Networks with ASP.NET Krishna Chaitanya T │ Future Web Research Lab, SETLabs, Infosys WE.
Linked Data & Semantic Web Technology Development of Twitter Applications Part 1. Overview Dr. Myungjin Lee.
CAS Proxying and Web Services The somewhat “easy way” Presented By: Joseph Mitola Programmer/Analyst Office Of The Registrar.
#SummitNow Consuming OAuth Services in Alfresco Share Alfresco Summit 2013 Will Abson
 David Hietpas  Library Web Developer  University of Wisconsin - Polk Library.
Windows Vista Configuration MCTS : Internet Explorer 7.0.
Stata tweets and other API libraries: a practical guide William Matsuoka Stata Conference Chicago, IL - July 28, 2016.
Developers Introduction to the Power BI Platform.
Introduction to gathering and analyzing data via APIs Gus Cavanaugh
Consuming OAuth Services in Alfresco Share
RESTful Sevices Distributed Objects Presented by: Shivank Malik
Cosc 5/4730 REST services.
An introduction to REST for SharePoint 2013
All about social networking
Twitter & NoSQL Integration with MVC4 Web API
HTTP, RESTful Web Services, HTTP and REST Tools: Postman, Fiddler
Connor Griesemer & Kevin Wu
WEB API.
02 | Web API Basic Design Jeremy Likness | Principal Architect
E-rate Program: Data 2018 Applicant Training
Feature Extraction on Twitter Streaming data using Spark RDD
Unit4 Customer Portal Knowledge User Access.
Building production-ready APIs with ASP.NET Core 2.2
Python and REST Kevin Hibma.
Web-Services and RESTful APIs
Informer 5 API How to get connected and start integrating
MY NCBI (module 4.5).
Presentation transcript:

Overview of Twitter API Nathan Liu

Twitter API Essentials Twitter API is a Representational State Transfer(REST) style web services exposed over HTTP(S). Can be accessed with any HTTP client using either GET(accessor) and POST(mutator) methods. Examples: – Getting a users profile – Retrieving a users latest tweets – Search for all tweets containing the term twitter

Method Categories Account: authentication Block: blocking and unblock users Direct message: managing messages sent between pairs of users Favorites: getting and setting favorite tweets of users. Friendship: checking if two users and following each other. Social graph: getting follower and friends. Status: retrieve, post, delete tweets Timeline: retrieve latest collection of tweets Trends: retrieve trending topics Users: getting and setting user details.

Three Major APIs REST API: access to core data about individual users, update and retrieve timelines, status data. Most used for building Search API: retrieving tweets with constrains on keyword, locations, time. Streaming API: receiving real time feed for access large scale tweet stream. Can filter with keywords, user lists, locations.

Working with Twitter API Results are returned in JSON, XML or RSS format. Documentation: – Client libraries available in many different languages: – Each free account can make a maximum of 150 requests per hour. A web console for you to try out different methods: – A very good python package is Tweepy ( which supports all three APIs.

Example 1: Working with Tweepy auth = tweepy.BasicAuthHandler("username", "password") api = tweepy.API(auth) auth = tweepy.OAuthHandler("consumer_key", "consumer_secret") # Redirect user to Twitter to authorize redirect_user(auth.get_authorization_url()) # Get access token auth.get_access_token("verifier_value") # Construct the API instance api = tweepy.API(auth) # Iterate through all of the authenticated user's friends for friend in tweepy.Cursor(api.friends).items(): # Process the friend here process_friend(friend) # Iterate through the first 200 statuses in the friends timeline for status in tweepy.Cursor(api.friends_timeline).items(200): # Process the status here process_status(status) # follow every follower of the authenticated user for follower in tweepy.Cursor(api.followers).items(): follower.follow()

Example 2: Listen for All Tweets Containing Obama from tweepy.streaming import StreamListener, Stream class Listener ( StreamListener ): def on_status( self, status ): print '-' * 20 print status.text return if __name__ == "__main__": USERNAME = "YourUsernameHere" PASSWORD = "YourPasswordHere" listener = Listener() stream = Stream( USERNAME, PASSWORD, listener ); stream.filter( track=( "obama", ) )