BUILDING A FACEBOOK APP. STEP 1 Create a Developers License. Make sure to take note/record the app id/key.

Slides:



Advertisements
Similar presentations
Authentication Simon Cross Partner Engineer facebook.com/sicross An Overview.
Advertisements

OAuth 2.0 By “PJ” (JP on meetup.com) iOS and PHP developer, and occasional lawyer Contact me via:
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.
Facebook Applications Teppo Räisänen. Facebook Applications Facebook provides many Software Development Kits (SDK’s) – PHP SDK – iOS SDK – Android SDK.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Hints for HW#8. HW#6 Architecture Result of Query GOOG Browser with web page PHP Script client Apache web server finance.yahoo.com Send query with arguments.
Fraser Technical Solutions, LLC
Intelligent Tutoring System Mobile Communication Team Drew Boatwright Nakul Dureja Richard Liou.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
JSON (JavaScript Object Notation).  A lightweight data-interchange format  A subset of the object literal notation of JavaScript (or ECMA-262).  A.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Chris Pinski.  History  What is Ajax  Who uses Ajax  Underlying Technologies  SE Aspect  Common Problems  Conclusion.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Subtitle touch | Title of presentation | Date DD/MM/YYYY Touch Cloud Android SDK Ghady Rayess – Jan 19 th, 2013.
CS378 - Mobile Computing Web - WebView and Web Services.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
JavaScript, Fourth Edition Chapter 12 Updating Web Pages with AJAX.
PARSING FACEBOOK DATA FOR ANDROID 1. Step by Step  Import Android SDK  Get the hash key  Create a new app  Create a new project in Eclipse 
JavaScript Programming B.Ramamurthy 6/113/2014B. Ramamurthy CSE6511.
WEB API: WHY THEY MATTER ECOL 453/ Nirav Merchant
THttpServer class Sergey Linev (GSI). Some history Development was inspired by JSRootIO why not achieve similar functionality with online ROOT application?
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
Chapter 8 Cookies And Security JavaScript, Third Edition.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Chapter 6 Server-side Programming: Java Servlets
JSON Java Script Object Notation Copyright © 2013 Curt Hill.
Facebook Query Language Dr.Kwanchai Eurviriyanukul February 2011 RMUTL.
 Facebook Integration on iOS Phan Thanh Phat Huynh Thanh Van.
Windows Role-Based Access Control Longhorn Update
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
1 © Donald F. Ferguson, All rights reserved.Modern Internet Service Oriented Application Development – Lecture 2: REST Details and Patterns Some.
4. Javascript M. Udin Harun Al Rasyid, S.Kom, Ph.D Lab Jaringan Komputer (C-307) Desain.
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
EPICS to TANGO Translator Rok Šabjan on behalf of Rok Štefanič Presented at ICALEPCS, Knoxville, October.
Session 07 Module 13 - Collections. Collections / Session 7 / 2 of 32 Review  A delegate in C# is used to refer to a method in a safe manner.  To invoke.
AJAX. Ajax  $.get  $.post  $.getJSON  $.ajax  json and xml  Looping over data results, success and error callbacks.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
OVERVIEW AND PARSING JSON. What is JSON JavaScript Object Notation Used to format data Commonly used in Web as a vehicle to describe data being sent between.
Project 5: Customizing User Content Essentials for Design JavaScript Level Two Michael Brooks.
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
JavaScript, Sixth Edition Chapter 11 Updating Web Pages with Ajax.
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
CHAPTER 9 File Storage Shared Preferences SQLite.
THE API AN INTRODUCTION TO THE MINISTRYPLATFORM APPLICATION PROGRAMMING INTERFACE STEPHEN WAREHAM.
(Part 2). From Part 1 We …  Signed up to be facebook developers Verified our facebook account. Added facebook developer app.  Setup a Heroku facebook.
Framework and Graph Visualization Tools
JSON Web Service - Introduction
Viewbiquity HTML5 Tom Shafron Developer’s Blog CEO, Viewbiquity
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
Twitter & NoSQL Integration with MVC4 Web API
Session V HTML5 APIs - AJAX & JSON
Built in Fairfield County: Front End Developers Meetup
HTML Level II (CyberAdvantage)
HTML5 AJAX & JSON APIs
JavaScript & jQuery AJAX.
JavaScript CS 4640 Programming Languages for Web Applications
Server-Side Programming
TN19-TCI: Integration and API management using TIBCO Cloud™ Integration
Computer Network Information Center, Chinese Academy of Sciences
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

BUILDING A FACEBOOK APP

STEP 1 Create a Developers License. Make sure to take note/record the app id/key

STEP 2. Understand the methodology GRAPH API explorer. – PERMISSIONS – ACCESS TOKENS (OAUTH).

Access tokens and OAuth An access token is a random string that provides temporary, secure access to Facebook APIs. A token identifies a User, App or Page session and provides information about granted permissions. They also include information about when the token will expire and which app generated the token. Because of privacy checks, the majority of API calls on Facebook need to be signed with an access token. All access tokens are generated with OAuth 2.0 authentication and authorization procedures.UserAppPagegranted permissionswhen the token will expireOAuth 2.0

Example of oauth

WHAT IS JSON? Stands for JavaScript Object Notation, and is a text-based open standard designed for human-readable data interchange.open standard human-readable It is derived from the JavaScript scripting language for representing simple data structures and associative arrays, called objects.JavaScriptdata structuresassociative arrays

JSON is built on two structures: – A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array. – An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence. These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures. – An array is an ordered collection of values. An array begins with [ (left bracket) and ends with ] (right bracket). Values are separated by, (comma). – A value can be a string in double quotes, or a number, or true or false or null, or an object or an array. These structures can be nested.

In other words … It is a very complex object! It represents and stores data. Most APIs will allow you to choose to receive the ‘response data’ in JSON format. This makes it easier for us to manipulate and ‘read’.

STEP 3. Implement SDK for Javascript. What is an SDK? SDK (Software Development Kit) A Software Development Kit is a package of pre- written code that developers can re-use in order to minimize the amount of unique code that they need to develop themselves. SDKs can help to prevent unnecessary duplication of effort in a development community.

SDK and APIs So what is the difference between an API and an SDK? an API is an interface. It's like the specification of the telephone system or the electrical wiring in your house. Anything* can use it as long as it knows how to interface. You can even buy off-the-shelf software to use a particular API, just as you can buy off the shelf telephone equipment or devices that plug into the AC wiring in your house. an SDK is implementation tooling. It's like a kit that allows** you to build something custom to hook up to the telephone system or electrical wiring.

FACEBOOK SDK CORE METHODS Core Methods FB.init FB.api FB.ui

FB.init Init Using the method outlined on facebook dev site, the JS SDK is loaded asynchronously so it does not block loading other elements of your page. The function assigned to window.fbAsyncInit is run as soon as the SDK source has finished loaded. Any code that you want to run after the SDK is loaded should be placed within this function and after the call to FB.init. For example, this is where you would test the logged in status of the user or subscribe to any Facebook events in which your application is interested.test the logged in statussubscribe to any Facebook events See the FB.init documentation for a full list of available initialization options.FB.init documentation By default, for performance, the JS SDK is loaded minified. If you are in development and want an un-minified version of the JS SDK, which also enforce arguments in a stricter way, then turn on the debug argument.minified

FB.api Overview FB.api makes API calls to the Graph API or Deprecated REST API.Graph APIDeprecated REST API Examples FB.api ( ‘query url’, callback function); FB.api('/me', function(response) { alert(response.name); }); – Get the 3 most recent Post Objects Connected to (in other words, authored by) the Facebook Platform Page Object:

FB.ui Overview FB.ui is a generic helper method for triggering Dialogs which allow the user to take some action. Dialogs

Facebook SDK methods LOGIN/LOGOUT FB.login() — ask the user to login or request additional permissions FB.login() FB.logout() — log the user out (only if the user has authorized your application) FB.logout() FB.getLoginStatus() — asynchronous method to get the current Facebook login status of the user FB.getLoginStatus() FB.getAuthResponse() — synchronous accessor for the current authorization response record FB.getAuthResponse() FB.login() — ask the user to login or request additional permissions FB.login() FB.logout() — log the user out (only if the user has authorized your application) FB.logout() FB.getLoginStatus() — asynchronous method to get the current Facebook login status of the user FB.getLoginStatus() FB.getAuthResponse() — synchronous accessor for the current authorization response record FB.getAuthResponse()