Linked Data & Semantic Web Technology Development of Twitter Applications Part 1. Overview Dr. Myungjin Lee.

Slides:



Advertisements
Similar presentations
HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,
Advertisements

Enabling Secure Internet Access with ISA Server
Overview of Twitter API Nathan Liu. Twitter API Essentials Twitter API is a Representational State Transfer(REST) style web services exposed over HTTP(S).
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
Cookies, Sessions. Server Side Includes You can insert the content of one file into another file before the server executes it, with the require() function.
Mining twitter 1.9, 김종명. 1.9 Making Robust Twitter Requests Problem –You want to write a long-running script that harvests large amounts.
Using Evernote and Google Docs in your web or mobile application (and potentially Dropbox and Skydrive) By Peter Messenger Senior Developer – Triple Point.
CareCentrix Direct Training.
Twitter – what is it? The School District of Haverford Township |
Getting Started on Twitter. What is Twitter? A social networking site that started by letting people answer the question, “What are you doing?” Microblogging.
PSRC Technology Integration Team TWITTER 101.  Twitter is a social networking tool or microblog.  It is composed of short text, pictures, and URLs called.
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.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Web 2.0: Concepts and Applications 5 Connecting People.
IU Librarians’ Day - 05/15/09 Emerging Technologies & Libraries: What’s new & useful to libraries Chanitra Bishop, Instruction & Emerging Technologies.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Kabel Nathan Stanwicks, Head Circulation and Media Services Department Electronic Reserves Introductory Tutorial for Faculty.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
RSS RSS is a method that uses XML to distribute web content on one web site, to many other web sites. RSS allows fast browsing for news and updates.
Managing and Avoiding Junkmail. Junk  Where does Junk Mail come from? People with whom you do business  Pepsi Friends of people with whom you.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Creating Online Class Communities Jennifer Dorman Discovery Education
Internet Banking Standard and Standard-Hybrid Registration Intuit Financial Services University Internet Banking Certification Training.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Tweet, Tweet, Tweet… Tweeting Assignments & Discussions Kara Damm, Technology Integration Specialist.
CSCI 323 – Web Development Chapter 1 - Setting the Scene We’re going to move through the first few chapters pretty quick since they are a review for most.
PSRC Technology Integration Team Twitter 101.  Twitter is a social networking tool or microblog.  It is composed of short text, pictures, and URLs called.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Server-side Scripting Powering the webs favourite services.
C HAPTER Social Networking Using Twitter 7 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall.
REST.  REST is an acronym standing for Representational State Transfer  A software architecture style for building scalable web services  Typically,
JavaScript, Fourth Edition
HTRC API Overview Yiming Sun. HTRC Architecture Data API Portal access Direct programmatic access (by programs running on HTRC machines) Security (OAuth2)
Knowing Your Facebook From Your Flickr Dan O’ Neill – -
Twitter.  Twitter is a social networking and micro-blogging service that enables its users to send and read other user’s updates.
CollectionSpace Service REST-based APIs June 2009 Face-to-face Aron Roberts U.C. Berkeley IST/Data Services.
Network Management Tool Amy Auburger. 2 Product Overview Made by Ipswitch Affordable alternative to expensive & complicated Network Management Systems.
Tutorial 1: Browser Basics.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Update By: Brian Klug, Li Fan Presentation Overview: API we plan to use (Syntax and commands) Obtainable Data Types (Location, Text, Time, User, Reply)
Jargon Busters Presented by Katie Munton and Natalie Dawson.
Social Media 101 An Overview of Social Media Basics.
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.
NHIN DIRECT REST IMPLEMENTATION Prepared by: The NHIN Direct REST Team June 8, 2010.
MEMBERSHIP AND IDENTITY Active server pages (ASP.NET) 1 Chapter-4.
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.
ASP. What is ASP? ASP stands for Active Server Pages ASP is a Microsoft Technology ASP is a program that runs inside IIS IIS stands for Internet Information.
Introduction to Morpho RCN Workshop Samantha Romanello Long Term Ecological Research University of New Mexico.
1 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 2: REST Details and Patterns Some.
ICM – API Server & Forms Gary Ratcliffe.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
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.
Secure Mobile Development with NetIQ Access Manager
It’s not just about what you had for breakfast!.  No other medium has the capability to send and receive information as widely and as quickly as Twitter.
Twitter anyone? Sue Newell Chief Operating Officer Faculty of Health and Social Sciences Leeds Metropolitan University.
Linked Data & Semantic Web Technology Development of Twitter Applications Part 4. Timeline and Tweet Dr. Myungjin Lee.
Linked Data & Semantic Web Technology Development of Twitter Applications Part 2. Twitter for Websites Dr. Myungjin Lee.
Web Programming Language
Crawling Twitter Data Konstantinos Semertzidis
Node.js Express Web Applications
Data Virtualization Tutorial… CORS and CIS
Node.js Express Web Services
All about social networking
Azure AD Line Of Business Application Integration
WEB API.
Configuring Internet-related services
Presentation transcript:

Linked Data & Semantic Web Technology Development of Twitter Applications Part 1. Overview Dr. Myungjin Lee

Linked Data & Semantic Web Technology What is Twitter? An information network – a real-time information network that connects you to the latest stories, ideas, opinions and news about what you find interesting – using small bursts of information called Tweets with 140 characters long – 400 million tweet-per-day (June 6, 2012) Open Source base – built on open source software, from the back-end to the front-end – 2

Linked Data & Semantic Web Technology not symmetrical (nonreciprocal relationships) inherent openness cannot edit, just can delete symmetrical “walled garden”, protected information can edit and delete 3 How is Twitter Different from Other Social Tools?

Linked Data & Semantic Web Technology Twitter Terms Twitter – the service that can communicate with anyone else Tweets – messages of 140 characters or fewer Follower – someone who opts in to receive your tweets Following – the people whose tweets you opt in to – a public message typically sent as a response to a previous Tweet Direct messages (DMs) – a message sent privately to one of your followers Private account – an account whose tweets are not public Trending topics – the most popular terms on Twitter at a moment in time Retweets (RTs) – when users find an interesting tweet and share it with their followers Hashtag – the convention of flagging a word with the hash character #topic to aid with keyword search and the tagging of discussions 4

Linked Data & Semantic Web Technology Quiz 1.Why is there a character limit in a tweet? A.Twitter decided that’s long enough for a thought. B.Twitter wanted to save on server space. C.There is a hard-character limit on SMS. 2.True or False: There are two types of accounts on Twitter: one that is open and another that is closed. 3.What is a direct message, or DM? A.A tweet that doesn’t go through Twitter’s server. B.A private tweet that goes only to the person you are sending it to. C.A message that comes from Twitter corporate 5

Linked Data & Semantic Web Technology Services for Twitter Applications Twitter for Websites – a suit of products that enables websites to easily integrate Twitter, such as the Like button and the Follow button Search API – for products looking to allow a user to query for Twitter content – finding a set of tweets with specific keywords, finding tweets referencing a specific user, or finding tweets from a particular user REST API – to access some of the core primitives of Twitter including timelines, status updates, and user information – offering programmatic access to the timeline, status, and user objects Streaming API – the real-time sample of the Twitter Firehose – low-latency high volume access to Tweets – to establish a long-lived HTTP connection and maintain that connection 6

Linked Data & Semantic Web Technology Differences between Streaming and REST 7 REST API Streaming API

Linked Data & Semantic Web Technology Registering Your Application Application Details – Name your application name – Description your application description – Website your application’s publicly accessible home page – Callback URL webpage URL where twitter returns after successfully authenticating 8

Linked Data & Semantic Web Technology Registering Your Application 9

Linked Data & Semantic Web Technology OAuth Process for Desktop Application 10

Linked Data & Semantic Web Technology OAuth Process for Web Application 11

Linked Data & Semantic Web Technology HTTP Status Codes CodeTextDescription 200OKSuccess! 304Not ModifiedThere was no new data to return. 400Bad Request The request was invalid. An accompanying error message will explain why. This is the status code will be returned during version 1.0 rate limiting. In API v1.1, a request without authentication is considered invalid and you will get this response. 401UnauthorizedAuthentication credentials were missing or incorrect. 403Forbidden The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. This code is used when requests are being denied due to update limits. 404Not Found The URI requested is invalid or the resource requested, such as a user, does not exists. Also returned when the requested format is not supported by the requested method. 406Not AcceptableReturned by the Search API when an invalid format is specified in the request. 410Gone This resource is gone. Used to indicate that an API endpoint has been turned off. For example: "The Twitter REST API v1 will soon stop functioning. Please migrate to API v1.1." 420Enhance Your CalmReturned by the version 1 Search and Trends APIs when you are being rate limited. 422Unprocessable EntityReturned when an image uploaded to POST account/update_profile_banner is unable to be processed. 429Too Many Requests Returned in API v1.1 when a request cannot be served due to the application's rate limit having been exhausted for the resource. 500Internal Server ErrorSomething is broken. Please post to the group so the Twitter team can investigate. 502Bad GatewayTwitter is down or being upgraded. 503Service UnavailableThe Twitter servers are up, but overloaded with requests. Try again later. 504Gateway timeoutThe Twitter servers are up, but the request couldn't be serviced due to some failure within our stack. Try again later. 12

Linked Data & Semantic Web Technology Error Messages and Codes When the Twitter API returns error messages, it does so in your requested format. 13 {"errors":[{"message":"Sorry, that page does not exist","code":34}]} CodeTextDescription 32Could not authenticate youYour call could not be completed as dialed. 34Sorry, that page does not existCorresponds with an HTTP the specified resource was not found. 88Rate limit exceededThe request limit for this resource has been reached for the current rate limit window. 89Invalid or expired tokenThe access token used in the request is incorrect or has expired. Used in API v Over capacityCorresponds with an HTTP Twitter is temporarily over capacity. 131Internal errorCorresponds with an HTTP An unknown internal error occurred. 135Could not authenticate you Corresponds with a HTTP it means that your oauth_timestamp is either ahead or behind our acceptable range 215Bad authentication data Typically sent with 1.1 responses with HTTP code 400. The method requires authentication but it was not presented or was wholly invalid.

Linked Data & Semantic Web Technology Twitter Out of the Box Basic Limits for Twitter Applications – 1,000 total updates per day, on any and all devices – 250 total direct messages per day, on any and all devices – Changes to account Four per hour – Following (daily): The technical follow limit is 1,000 per day. – Following (account-based): An account is following 2,000 other users. Whitelisting – to provide developers with an increase from 150 to 20,000 requests per hour – however, no longer grant whitelisting request 14

Linked Data & Semantic Web Technology Rate Limiting REST API Rate Limiting – Default rate limit for calls to the REST API Unauthenticated calls are permitted 150 request per hour against the public facing IP of the server or device. OAuth calls are permitted 350 requests per hour against the oauth_token – Invalid OAuth information the API For methods which require authentication, the API will return an error response. For methods which can be requested unauthenticated, the request will count against the unauthenticated rate limit. – API methods to submit data using HTTP POST are not rate limited. Search API Rate Limiting – higher than the REST Rate Limit, sufficient for most application Streaming API – rate limiting and access level that are appropriate for long-lived connections 15

Linked Data & Semantic Web Technology Rate Limiting Knowing if you are rate limited – If your application is being rate-limited by the REST API, it will receive HTTP 400 response codes. – If you are rate limited on the Search or Streaming APIs, an HTTP 420 response code will be returned. Blacklisting – If you or your application abuses the rate limits we will blacklist it. 1.If you are using the REST API, make a call to the GET application/rate_limit_status from the account or computer which is blacklisted. 2.Explain why you think your application was blacklisted. 3.Describe in detail how you have fixed the problem that you think caused you to be blacklisted. 16

Linked Data & Semantic Web Technology Rate Limiting Checking the rate limit – Response headers the current rate status in the response header – Request your rate limits from the API an API call to /1.1/application/rate_limit_status.xml or /1.1/application/rate_limit_status.json 17 X-RateLimit-Limit: 350 X-RateLimit-Remaining: 350 X-RateLimit-Reset: {"reset_time_in_seconds"=> , "remaining_hits"=>350, "hourly_limit"=>350, "reset_time"=>"Fri Jun 25 17:07: "}

Linked Data & Semantic Web Technology Things Every Developer Should Know Tweet IDs are enormous and break javascript – use the id_str field instead of id The API is entirely HTTP-based – basically, require a GET request – a POST request to submit, change, or destroy data – a DELETE request to destroy data The API is a RESTful resource – to support XML, JSON, and the RSS and Atom syndication formats Parameters have certain expectations – two things to keep in mind Parameter values should be converted to UTF-8 and URL encoded. The page parameter begins at 1, not 0. – two special parameters in the Twitter API callback : to wraps response in a callback method of your choice suppress_response_codes : If this parameter is present, all responses will be returned with a 200 OK status code – even errors. 18

Linked Data & Semantic Web Technology Clojure – twitter-api twitter-api ColdFusion – MonkehTweet Twitter API MonkehTweet Twitter API.NET – LINQ2Twitter LINQ2Twitter – Spring.NET Social extension for Twitter Spring.NET Social extension for Twitter – TweetSharp TweetSharp Go – twittergo twittergo Java – Twitter4J Twitter4J Javascript / node.js – user-stream user-stream – codebird-js codebird-js Lua/Corona SDK – Twitter Facade Twitter Facade Objective-C – FHSTwitterEngine FHSTwitterEngine Perl – Net::Twitter Net::Twitter PHP – tmhOAuth tmhOAuth – twitteroauth twitteroauth – 140dev Twitter Framework 140dev Twitter Framework – codebird-php codebird-php Python – tweepy tweepy – python-twitter python-twitter Ruby – Twitter Twitter – Twitter Console Twitter Console – TweetStream TweetStream Twitter Libraries 19

Linked Data & Semantic Web Technology Exploring the Twitter API 20

Linked Data & Semantic Web Technology References Christoper Peri, Sams Teach Yourself the Twitter API in 24 Hours, SAMS, June