CS160 Discussion Section David Sun. Facebook Application Architecture Information repository Session management GUI Privacy.

Slides:



Advertisements
Similar presentations
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences Facebook API Teppo Räisänen
Advertisements

HTTP Request/Response Process 1.Enter URL ( in your browser’s address bar. 2.Your browser uses DNS to look up IP address of server.com.
Course for teachers covering: HTML, CSS, JavaScript, JQuery PHP, PHP/MySQL
DT228/3 Web Development WWW and Client server model.
Page 1 PHP, HTML, STATE Achmad Arwan, S.Kom. Page 2 PHP ( PHP: Hypertext Preprocessor) A programming language devised by Rasmus Lerdorf in 1994 for building.
Electrical and Computer Engineering Vitaly Gordievsky Alex Trefonas Scott Richard Matt Beckford Final Project Review.
Facebook Platform: 101 Network Journal Club Meeting Shaomei Wu May 7, 2008.
Design of Web-based Systems IS Development: lecture 10.
Mark Dixon, SoCCE SOFT 131Page 1 20 – Web applications: HTML and Client-side code.
IS 360 Course Introduction. Slide 2 What you will Learn (1) The role of Web servers and clients How to create HTML, XHTML, and HTML 5 pages suitable for.
Master’s course Bioinformatics Data Analysis and Tools Lecture 6: Internet Basics Centre for Integrative Bioinformatics.
Facedroid Facebook for Android. Facebook Application - API key - Secret key - PHP page Facebook Application - API key - Secret key - PHP page Facebook.
Dynamic Web Pages. Web Programming  All our web pages so far have been static pages. 1. We create a web page 2. We upload it to the web server 3. People.
Apache Tomcat Server – installation & use Server-side language-- use Java Server Pages Contrast Client-side languages HTML Forms Servers & Server-side.
Apache Tomcat Server Typical html Request/Response cycle
Electrical and Computer Engineering PeopleFinder Vitaly Gordievsky Alex Trefonas Scott Richard Matt Beckford Midway Design Review.
Electrical and Computer Engineering PeopleFinder Vitaly Gordievsky Alex Trefonas Scott Richard Matt Beckford Comprehensive Design Review.
Introduction to Web Programming SCSC Mentoring Special Class Made Harta Dwijaksara –
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
Intro to PHP Introduction to server-side scripts (It’s all good :D) © TAFE NSW
IT 210 The Internet & World Wide Web introduction.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, October 18, 2012 Session 7: PHP.
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Create an online booking system (login/registration)
Fall, Privacy&Security - Virginia Tech – Computer Science Click to edit Master title style Design Extensions to Google+ CS6204 Privacy and Security.
Server-side Scripting Powering the webs favourite services.
WEB-ENHANCED INFORMATION MANAGEMENT (COMS E6125) SPRING 2008 (CVN) NAVID AZIMI (NA2258) Web Platforms, or: How I Learned To Stop Worrying And Love Facebook.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
Python CGI programming
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
School of Computing and Information Systems CS 371 Web Application Programming PHP – Forms, Cookies, Sessions and Database.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
CHAPTER 7 Form & PHP. Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
Facebook Query Language Dr.Kwanchai Eurviriyanukul February 2011 RMUTL.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Introduction to PHP.
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.
Facebook is a social utility that connects you with the people around you. Use Facebook to…  Keep up with friends and family  Share photos and videos.
Facebook for Beginners One Session Class. What will you learn today? What can you do on Facebook? Creating a profile Privacy Connecting with friends Sending.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
IS2803 Developing Multimedia Applications for Business (Part 2) Lecture 2: Introduction to IS2803 Rob Gleasure
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
Web Programming 3(3-0-6) Introduction to interactive, event-driven and dynamic web development; web programming with freeware and commercial tools;
1/7/2016www.infocampus.co.in1. 1/7/2016www.infocampus.co.in2 Web Development training gives you and all-round training in both the design and the development.
 Project Team: Suzana Vaserman David Fleish Moran Zafir Tzvika Stein  Academic adviser: Dr. Mayer Goldberg  Technical adviser: Mr. Guy Wiener.
Basics Components of Web Design & Development Basics, Components, Design and Development.
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 8 – Review Reference:
Dreamweaver - Forms questionnaire, register, login, etc.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
Web Development. Agenda Web History Network Architecture Types of Server The languages of the web Protocols API 2.
Tonga Institute of Higher Education IT 141: Information Systems
PHP / MySQL Introduction
Newsletters An automatic news recommender system
Tonga Institute of Higher Education IT 141: Information Systems
Web Systems Development (CSC-215)
Tonga Institute of Higher Education IT 141: Information Systems
School of Computer Science
Web Application Development Using PHP
Presentation transcript:

CS160 Discussion Section David Sun

Facebook Application Architecture Information repository Session management GUI Privacy

Creating a Facebook Application Add “Developer” application on Facebook. Click “Set Up New Application”. Provide: – Application name, e.g. myfirstapp – Support e.g. – Callback URL (this is the URL to your application code) – Canvas page URL (the actual facebook url as seen by the users) You will get: – An API Key : 05a5ef15248bb9a4887e5f – A Secret Key: 09901d83048d959eaad17228c8c7a95b – Identify the application to Facebook

Client/Server Interaction Browser App Canvas Your app server Facebook server 2. App server returns FBML 3. Facebook renders FBML to HTML 1. Browser makes request

Browser Client/Server Interaction App Canvas Your app server Facebook server 2. FB server calls App Server through callback URL 4. App server returns FBML 5. Facebook renders FBML to HTML 1. Browser makes request 3. App calls FB API

appinclude.php <?php require_once 'facebook.php'; $appapikey = '05a5ef15248bb9a4887e5f ' $appsecret = '09901d83048d959eaad17228c8c7a95b' $facebook = new Facebook($appapikey, $appsecret); $user = $facebook->require_login(); //[todo: change the following url to your callback url] $appcallbackurl = ' //catch the exception that gets thrown if the cookie has an invalid session_key in it try { if (!$facebook->api_client->users_isAppAdded()) { $facebook->redirect($facebook->get_add_url()); } } catch (Exception $ex) { //this will clear cookies for your application and redirect them to a login prompt $facebook->set_user(null, null); $facebook->redirect($appcallbackurl); } ?>

Information Management Application generic information: – Information (or a subset of) that users submitted to Facebook: name, birth-date, relationship status, interests, education background etc. – Can be retrieved by SQL queries or Facebook API. Application specific information – Data users submit to or needs to be maintained for your application. – MYSQL database.

Facebook Query Language (FQL) FQL = subset of SQL – Only select-statements, no updates/deletes Exposed Facebook data/tables: – User, Friend, Group, Group_member, Event, Event_member, Photo, AlbumPhoto_tag SELECT name, affiliations FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=211031)

User Table user uid*, first_name, last_name, name*, pic_small, pic_big, pic_square, pic, affiliations, profile_update_time, timezone, religion, birthday, sex, hometown_location, meeting_sex, meeting_for, relationship_status, significant_other_id, political, current_location, activities, interests, is_app_user, music, tv, movies, books, quotes, about_me, hs_info, education_history, work_history, notes_count, wall_count, status, has_added_app

Application Specific Information Repository We will be support MYSQL in this class project You will be able to run individual MYSQL servers on your instructional accounts. Design a database schemata that matches the needs of your application. – will need to be “interoperable” with Facebook databases. – should be sound, i.e. correct keys, normalized etc.

Example: Free Gifts

PHP “Object oriented” server-side scripting language. Becoming increasingly popular in recent years. Mixture of C/Pearl syntax. HTML-compliant Supports external resource: e.g. mysql

PHP/MySQL <?php // Connecting, selecting database $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') or die('Could not connect: '. mysql_error()); echo 'Connected successfully'; mysql_select_db('my_database') or die('Could not select database'); ?>

Facebook API Wrappers for FQL queries. Implemented in a variety of scripting languages: PHP, Python, Ruby,.NET Getting session specific information: – createToken – getSession – getLoggedInUser Getting Facebook data: – Users.getInfo – Photos.get

FBML – Facebook Markup Language Subset of HTML + Facebook elements Functionalities: – Enforce uniform/standard look and feel for shared components: navigation, wall, dashbord, friend- selector, buttons, time-dates, dialog, notification. – Implementing privacy designs: e.g., restrict the content to be only visible to the current viewer. Syntax just like well-formed HTML/XML.

FBML have read am reading want to read

FBML Success message This is the success message text.

FBML Privacy control is a key design issue in your project. You can enclose GUI elements with privacy tags to control what other people can see on your profile. Welcome back to your profile! User , you are in the Berkeley network!

Other technology JavaScript (beta) Mock-AJAX Flash/Action-Script Ruby/ColdFusion/.NET

Instructional Computing We’ll be supporting – MYSQL – PHP – Apache If you want to use any other technology then you will need to run your own server on the public domain.

Getting Started Set up MYSQL. Create the first application : hp hp Create a project webpage under your instructional: – Say a little about who you guys are. – The title/goal of the project – You will be uploading documents and code to this space in the future. – Send the URL

Resources FBML: BMLhttp://wiki.developers.facebook.com/index.php/F BML API: FQL: Code Testing: MySQL: (manual) shtml (quick reference) shtml PHP: Project WIKI – (instructions on setting up MySQL)