All about social networking

Slides:



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

Using the Self Service BMC Helpdesk
MY NCBI (module 4.5).
OAuth 2.0 By “PJ” (JP on meetup.com) iOS and PHP developer, and occasional lawyer Contact me via:
Twitter – what is it? The School District of Haverford Township |
NHnetWORKS December 14,  Facebook is a global Social Networking website that is operated and privately owned by Facebook, Inc.  Users can add.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
SOCIAL NETWORK INFORMATION CONSOLIDATION Developers:  Klasquin Tomer  Nisimov Yaron  Rabih Erez Advisors:  Academic: Prof. Elovici Yuval  Technical:
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
Individual User Logins
Login Screen This is the Sign In page for the Dashboard Enter Id and Password to sign In New User Registration.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Getting started on informaworld™ How do I register my institution with informaworld™? How is my institution’s online access activated? What do I do if.
Login Screen This is the Sign In page for the Dashboard New User Registration Enter Id and Password to sign In.
XHTML Introductory1 Linking and Publishing Basic Web Pages Chapter 3.
JavaScript, Fourth Edition
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.
Part 1 – PubMed Interface, Display options, Saving, Printing, and ing results. Instructions This part of the course is a PowerPoint demonstration.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Lecture 8 – Cookies & Sessions SFDV3011 – Advanced Web Development 1.
Chapter 6 Server-side Programming: Java Servlets
Cookies and Sessions IDIA 618 Fall 2014 Bridget M. Blodgett.
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.
ICM – API Server & Forms Gary Ratcliffe.
Esri UC 2014 | Demo Theater | Using ArcGIS Online App Logins in Node.js James Tedrick.
1 State and Session Management HTTP is a stateless protocol – it has no memory of prior connections and cannot distinguish one request from another. The.
PubMed/How to Search, Display, Download & (module 4.1)
Lab #3: Programming Exercises for Social Web APIs By J. H. Wang Dec. 26, 2011.
ITM © Port,Kazman 1 ITM 352 Cookies. ITM © Port,Kazman 2 Problem… r How do you identify a particular user when they visit your site (or any.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Vodafone India Partner On-boarding Quick Start Guide.
How to use Drupal Awdhesh Kumar (Team Leader) Presentation Topic.
Stata tweets and other API libraries: a practical guide William Matsuoka Stata Conference Chicago, IL - July 28, 2016.
Emdeon Office Batch Management Services This document provides detailed information on Batch Import Services and other Batch features.
Knowledge Hub Walkthrough August
Architecture Review 10/11/2004
Web fundamentals: Clients, Servers, and Communication
API (Application Program Interface)
Web Development Web Servers.
Authentication & .htaccess
CARA 3.10 Major New Features
Data Virtualization Tutorial… OAuth Example using Google Sheets
Assess Survey Invitations
Lawson System Foundation 9.0
ITM 352 Cookies.
PHP / MySQL Introduction
SSOScan: Automated Testing of Web Applications for Single Sign-On Vulnerabilities Yuchen Zhou, and David Evans 23rd USENIX Security Symposium, August,
Students Welcome to “Students” training module..
Overview Social media applications inform, educate, and entertain people through online (multi-)media A social networking application allows users to create.
Testing REST IPA using POSTMAN
WEB API.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
1CapApp Company Setup Documentation
How to Register on Active Orders Trading Grid Company Registration
Web Systems Development (CSC-215)
Using Google Plus Skills: Use Google Plus
iCIMS 17.1 Release: Highlights
GDSS – Digital Signature
Agenda OAuth Concepts Programming OAuth.
SharePoint Online Authentication Patterns
This is the Sign In page for the Dashboard
GT Portal v. 2.0 Data Delivery
PDS, Primo, Aleph, MetaLib, SFX General workflow
PHP Forms and Databases.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
FitnessGram® 2015 Student Information System (SIS) Extract Import Training for Georgia School Year.
D Guidance 26-Jun: Would like to see a refresh of this title slide
Chengyu Sun California State University, Los Angeles
Cross Site Request Forgery (CSRF)
Complete exercise 8-11 in the workbook.
Presentation transcript:

All about social networking

What is it exactly?? twitter is a free social networking and micro-blogging service At twitter you can follow somebody you like. people can follow you for any reason. Since its creation in 2006 by jack dorsey, twitter has gained notability and popularity worldwide. Twitter application programming interfaces are being widely used by third party applications running on different servers to allow their users to interact with twitter.

Flavors of twitter API’s Twitter offers two types of API’s Search API’s REST API’s The Search API methods give developers methods to interact with Twitter Search and trends data. Returns tweets that match a specified query. Tweets are text-based posts of up to 140 characters displayed on the author's profile page and delivered to the author's subscribers who are known as followers. Returns the top ten topics that are currently trending on Twitter. The Twitter REST API methods allow developers to access core Twitter data Access user information Update Status messages Access timelines

Rate limiting in Twitter API’s The Twitter API only allows clients to make a limited number of calls in a given hour. This policy affects the two APIs in different ways. Talking about REST API The default rate limit for calls to the REST API is 150 requests per hour. Rate limiting only applies to methods that request information with the HTTP GET command WHITELISTING can be done for application and IP address by filling out WHITELISTING form. You can thus make 2000 calls per hour Talking about Search API The Search API is rate limited by IP address. The number is quite a bit higher than 150 per hour Twitter does not disclose this number in order to discourage the unnecessary usage of Search. Consistent failure to avoid the rate-limiter will signal Twitter to automatically blacklist your application

How application works??

Oauth flow..

What happened in last slide? Well that was Oauth authentication But what exactly is Oauth authentication? I heard this for the first time.

What is OAuth? A simple open standard for secure API authentication. http://oauth.net

Specifically OAuth is... Need to log in to access parts of a website Authentication Need to log in to access parts of a website ex: bookmark a link, post a photo, add a friend, view a private message Token-based Authentication Logged-in user has a unique token used to access data from the site

Who is involved?

Who is it for? Service Providers - have an web API that needs authorization for certain functions Consumers - want to use an API that requires (or encourages) Oauth.

Goals…. Be Secure secure for end users easy to implement security features for website developers 3rd party developers don’t have access to passwords balance security with ease of use

Goals…. Be Open any website can implement Oauth any 3rd party developer can use Oauth open source client libraries

OAuth Setup Service provider gives documentation of authorization URLs and methods Consumer registers an application with the service provider

Sign in with Twitter It is the pattern of authentication that allows users to connect their Twitter account with third-party services It utilizes Oauth Although the flow is very similar, the authorization URL and workflow differs slightly as described below. The normal flow dictates that applications send request tokens to oauth/authorize in Twitter's implementation of the OAuth Specification. To take advantage of Sign in with Twitter, applications should send request tokens in the oauth_token paramater to oauth/authenticate instead.

Twitter URL’s for getting tokens Getting Request Token http://twitter.com/oauth/request_token Getting Access Token http://twitter.com/oauth/authorize

Register a Consumer Application Go to the following link https://twitter.com/oauth_clients/new

You will see something like this

Description of fields Application name Provide a name for your application Description Provide a brief description of your application Application website URL pointing to your application Organization For which organization are you providing this application Website Website of the organization Application type Type of your application. Check browser for our purposes Callback URL The URL where twitter shall redirect user after gaining authorization from user. Default access type Choose access types use twitter for login Mark this field if you wish to do so.

After registration?? Basic Steps Note down application consumer key Note down application consumer secret Consumer key and consumer secret will be used to authenticate your application, when user will try to use it. Start building application

Getting request token You will require to make call to http://twitter.com/oauth/request_token along with following GET parameters oauth_consumer_key This is they key you obtained after registering you application oauth_signature String constructed using chosen signature method oauth_signature_method supported method is "HMAC- SHA1” oauth_timestamp seconds since unix epoch ( use time() function in php ) oauth_nonce random string per timestamp used to stop replay atacks oauth_version 1.0 is used as a value

Authorization from user Response of previous request is a request token and request secret Redirect user to http://twitter.com/oauth/authorize along with oauth_token parameter in GET field. oauth_token is the request token we got from previous step. If user provides access to the application, twitter sends acccess token and access secret to our callback url we provide callback url while registering our application Save the access token and access secret in sessions for making subsequent requests for resources

Making API calls After we have got access token, we are now free to make various rest calls that required authentication Many REST API calls in twitter do not require authentications Check out http://apiwiki.twitter.com/Twitter-API-Documentation for the list of API’s that are available with twitter. If API call requires authorization, access token is sent along in authorization header of the call to a particular REST resource.

Format for response Developer chooses the format for response XML JSON You are free to choose any format while making request to any API. Eg. If you are requesting for any resource say www.twitter.com/<resource>.<format> . Making call to get user’s followers in xml format we can write the request url like this. http://twitter.com/users/show.xml

Dealing with response Once we get response in our desired format. We will require to extract information from that. If your desired format is XML, you can use inbuilt PHP function simplexml_load_string($content); to convert the response contained in $content into array. This array will contain different fields of response at its all indexes. Loop through the array to get the value for various fields of response.

Example API calls and responses We want to get list of friends of a user along with their status in xml format Make call to http://twitter.com/statuses/friends.xml with one of following GET parameters id.  Optional.  The ID or screen name of the user for whom to request a list of friends.  user_id.  Optional.  Specfies the ID of the user for whom to return the list of friends. screen_name.  Optional.  Specfies the screen name of the user for whom to return the list of friends cursor. Optional. Breaks the results into pages. A single page contains 100 users. This is recommended for users who are following many users. Provide a value of  -1 to begin paging. Provide values as returned to in the response body's next_cursor and previous_cursor attributes to page back and forth in the list. Example: http://twitter.com/statuses/friends/barackobama.xml?cursor=-1 Example: http://twitter.com/statuses/friends/barackobama.xml?cursor=1300794057949944903

Useful resources To know more about signing procedures visit http://oauth.net/core/1.0/#signing_process To know more about getting request tokens visit http://oauth.net/core/1.0/#anchor9 Visit to know more about Oauth http://oauth.net/core/1.0/ Visit to know more about Twitter API’s http://apiwiki.twitter.com/Twitter-API-Documentation

Thank You