SlideShare a Scribd company logo
Developing Facebook
    Application

       Wasu Khaodee
 Kanda Runapongsa Saikaew
   Computer Engineering
    Khon Kaen University
Facebook Application Types
 1. Run on web-browser
      1.1 A Website
      1.2 Canvas Application
    (Apps on Facebook.com)
 2. Run on a platform
      - Mobile Application
In this slide, we focus on developing Canvas Application
Focused Facebook APIs

1. Graph API
   The Graph API is the core of Facebook Platform, enabling
   you to read and write data to Facebook
   “nested query” is not supported by Graph API and in many
   cases, we need to get the data with multiple Graph API
   requests
2. FQL (Facebook Query Language)
   FQL is designed to condense Facebook queries and reduce
   response size
   Has similar syntax with SQL but there are somethings that
   cannot be done in FQL such as
      No Group by
What is Graph API?

 At Facebook's core is the social graph; people and the connections
 they have to everything they care about
 The Graph API presents a simple, consistent view of the Facebook
 social graph, uniformly representing objects in the graph (e.
 g., people, photos, events, and pages) and the connections
 between them (e.g., friend relationships, shared content, and photo
 tags)
 Every object in the social graph has a unique ID
  You can access the properties of an object by requesting https:
 //graph.facebook.com/ID
What is FQL?

 Facebook Query Language, or FQL, enables you to use a SQL-style
 interface to query the data exposed by the Graph API. It provides for
 some advanced features not available in the Graph API, including
 batching multiple queries into a single call
 You can execute FQL queries by fetching https://api.facebook.
 com/method/fql.query?query=QUERY. You can specify a response
 format as either XML or JSON with the format query parameter.
 Example
 SELECT name FROM user WHERE uid = me()
Facebook Software
Development Kit (SDK)
Here we are using PHP and Java Script

  - PHP SDK where source
     here : https://github.com/facebook/php-sdk/

  - Java Script where source
     here : http://connect.facebook.net/en_US/all.js
Application Permissions
Applications Permissions
 http://developers.facebook.
com/docs/authentication/permissions

Your App got only public data access without request
more permission.

Likes your app need to post some content
"publish_stream" need to be requested.
Creating Your Canvas App (1/4)

First goto : http://www.facebook.com/developers/




                                  here
Creating Your Canvas App (2/4)




            Your Apps Name here


                       And read the Terms
then create the app
Creating Your Canvas App (3/4)




                   Apps URL

        host URL
Creating Your Canvas App (4/4)


For Apps URL is where user access to your app.

Like http://apps.facebook.com/fbpublishpage

And host URL is where your Code is located.

Here we choose Canvas type as IFrame according to
Developer Roadmap
Create App Instance

get the SDK here : facebook.php

or download here : https://github.com/facebook/php-
sdk/archives/master
Get Session and Login

                      //Get App Session


                      //Get User Info to check the
                     login status


                                    //Get login URL (also
                                    grants permissions)




        //Just login if the user did not login
Using Graph API to See Feed




      Result for the code above
Using Graph API to Post Status




destination user id         identification of the author
                  to post                           the message


                 and this is the result
Using FQL to See Picture URL



  FQL command is like SQL such as SELECT, FROM,
  WHERE, IN or LIMIT

             and this is the result
Using Javascript with PHP to save ID of a
specified friend name


                    //Get current session



                    //Do some FQL call
Using JavaScript with PHP to post
message to a friend's wall



              //Send message with Graph API




                Current UI
Result from posting message to a
friend's wall
          result from the program
Reference
 http://developers.facebook.com/docs/
 http://www.slideshare.net/csaila/fql-overview
 http://www.takwing.idv.hk/
 Sample Code

More Related Content

PDF
Facebook API for Developers : Introducing the Facebook Platform
PDF
Facebook API for iOS
PPT
What's New on the Facebook Platform, July 2011
PPTX
Salesforce Winter Release
PPT
Facebook Apps
DOCX
Inna Manni newest resume
PPT
Developing Facebook Application
PPT
Flex Framework Presentation PPT
Facebook API for Developers : Introducing the Facebook Platform
Facebook API for iOS
What's New on the Facebook Platform, July 2011
Salesforce Winter Release
Facebook Apps
Inna Manni newest resume
Developing Facebook Application
Flex Framework Presentation PPT

What's hot (16)

ODP
Kt 15 07-2013
PPTX
Share point 2013 add-in (formerly app) development
PDF
PDF
Project LinkedList - LinkStack - A Social Media Reference Tool
PPTX
Naoki Hada iOS/Web/Mobile/Flash/RIA portfolio
PPT
Developing Joomla Extensions JUG Bangladesh meetup dhaka-2012
DOCX
Some Useful Flash API
PDF
[API the Docs Paris 2018] Architecting DX
PDF
Design Patterns : The Ultimate Blueprint for Software
PPT
Firefox OS Apps
PPT
PDF
Design patterns 1july
PPTX
Redmond o365 & SharePoint Saturday governance for power bi
DOCX
yogesh_resume
PDF
Implementing Web Services In Java
PPT
What's New on the Facebook Platform, March 2011
Kt 15 07-2013
Share point 2013 add-in (formerly app) development
Project LinkedList - LinkStack - A Social Media Reference Tool
Naoki Hada iOS/Web/Mobile/Flash/RIA portfolio
Developing Joomla Extensions JUG Bangladesh meetup dhaka-2012
Some Useful Flash API
[API the Docs Paris 2018] Architecting DX
Design Patterns : The Ultimate Blueprint for Software
Firefox OS Apps
Design patterns 1july
Redmond o365 & SharePoint Saturday governance for power bi
yogesh_resume
Implementing Web Services In Java
What's New on the Facebook Platform, March 2011
Ad

Viewers also liked (19)

PPTX
Facebook API
PPTX
Most Popular web application which build in php
PDF
Certified Human Resource Professionals, May 2015
PDF
YAPC::EU::2016, How to make your web application work for everyone
PDF
Conversion Tracking Tutorial
PDF
Facebook privacy setting
PPTX
Facebook Tutorial Video
PPT
Tutorial on twitter in the lmc
PPT
Facebook Timeline Tutorial by Leapdog
PPTX
Creating facebook page tutorial 2014
PDF
Facebook Usage Stats
PDF
After 55 facebook_tutorial
PDF
Facebook Tutorial
PDF
Facebook tutorial
PDF
Infographic: UK social media usage - Facebook
PDF
PilotLabs IBS - Facebook analysis rankings
PPTX
Facebook Privacy Setting Tutorial
PDF
Facebook Privacy Settings Tutorial (2015)
PPTX
Facebook 101 personal usage
Facebook API
Most Popular web application which build in php
Certified Human Resource Professionals, May 2015
YAPC::EU::2016, How to make your web application work for everyone
Conversion Tracking Tutorial
Facebook privacy setting
Facebook Tutorial Video
Tutorial on twitter in the lmc
Facebook Timeline Tutorial by Leapdog
Creating facebook page tutorial 2014
Facebook Usage Stats
After 55 facebook_tutorial
Facebook Tutorial
Facebook tutorial
Infographic: UK social media usage - Facebook
PilotLabs IBS - Facebook analysis rankings
Facebook Privacy Setting Tutorial
Facebook Privacy Settings Tutorial (2015)
Facebook 101 personal usage
Ad

Similar to Developing Facebook Application (20)

PPT
Facebook api
PPT
Facebook API
PPT
Creating a Facebook App
PPT
Facebook 3rd Party Api
PDF
Introduction to facebook java script sdk
PPTX
Facebook appsincloud
PPT
Facebook Connect
PDF
Introduction to facebook javascript sdk
PPTX
Facebook Developer Garage Cyberjaya
PPTX
Collaboration Portal for Researchers
PPT
Hi5 Open Social
PPTX
harePoint Framework Webinar Series: Consume Graph APIs in SharePoint Framework
PDF
Workshop : Facebook JavaScript SDK
PPTX
REST API Graph API GraphQL GraphiQL Presentation
PPT
Facebook Connect Integration
ODP
Facebook on Rails
PPTX
The Face Behind Facebook
PPTX
Introduction to facebook platform
PDF
Peepcode facebook-2-rails on facebook
ODP
OpenSocial
Facebook api
Facebook API
Creating a Facebook App
Facebook 3rd Party Api
Introduction to facebook java script sdk
Facebook appsincloud
Facebook Connect
Introduction to facebook javascript sdk
Facebook Developer Garage Cyberjaya
Collaboration Portal for Researchers
Hi5 Open Social
harePoint Framework Webinar Series: Consume Graph APIs in SharePoint Framework
Workshop : Facebook JavaScript SDK
REST API Graph API GraphQL GraphiQL Presentation
Facebook Connect Integration
Facebook on Rails
The Face Behind Facebook
Introduction to facebook platform
Peepcode facebook-2-rails on facebook
OpenSocial

More from Kanda Runapongsa Saikaew (20)

PDF
ความรู้ไอทีช่วยเลี้ยงลูกได้
PDF
Google Apps Basic for Education
PDF
PDF
Thai socialmedia
PDF
Introduction to JSON
PDF
Introduction to Google App Engine
PDF
Android dev tips
PDF
Introduction to Google+
PDF
ใช้ไอทีอย่างไรให้เป็นประโยชน์ เหมาะสม และปลอดภัย
PDF
บริการไอทีของมหาวิทยาลัยขอนแก่นเพื่อนักศึกษา
PPT
Baby Health Journal
PDF
Using Facebook as a Supplementary Tool for Teaching and Learning
PDF
วิธีการติดตั้งและใช้ Dropbox
PDF
Using Facebook and Google Docs for Teaching and Sharing Information
PDF
เครื่องมือเทคโนโลยีสารสนเทศฟรีที่น่าใช้
PDF
การใช้เฟซบุ๊กเพื่อแลกเปลี่ยนเรียนรู้
PDF
คู่มือการใช้ Dropbox
PDF
การใช้เฟซบุ๊กเพื่อการเรียนการสอน
PDF
การใช้เฟซบุ๊กอย่างปลอดภัยและสร้างสรรค์
PDF
Social Media (โซเชียลมีเดีย)
ความรู้ไอทีช่วยเลี้ยงลูกได้
Google Apps Basic for Education
Thai socialmedia
Introduction to JSON
Introduction to Google App Engine
Android dev tips
Introduction to Google+
ใช้ไอทีอย่างไรให้เป็นประโยชน์ เหมาะสม และปลอดภัย
บริการไอทีของมหาวิทยาลัยขอนแก่นเพื่อนักศึกษา
Baby Health Journal
Using Facebook as a Supplementary Tool for Teaching and Learning
วิธีการติดตั้งและใช้ Dropbox
Using Facebook and Google Docs for Teaching and Sharing Information
เครื่องมือเทคโนโลยีสารสนเทศฟรีที่น่าใช้
การใช้เฟซบุ๊กเพื่อแลกเปลี่ยนเรียนรู้
คู่มือการใช้ Dropbox
การใช้เฟซบุ๊กเพื่อการเรียนการสอน
การใช้เฟซบุ๊กอย่างปลอดภัยและสร้างสรรค์
Social Media (โซเชียลมีเดีย)

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Spectroscopy.pptx food analysis technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Cloud computing and distributed systems.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Empathic Computing: Creating Shared Understanding
Spectroscopy.pptx food analysis technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
Building Integrated photovoltaic BIPV_UPV.pdf

Developing Facebook Application

  • 1. Developing Facebook Application Wasu Khaodee Kanda Runapongsa Saikaew Computer Engineering Khon Kaen University
  • 2. Facebook Application Types 1. Run on web-browser 1.1 A Website 1.2 Canvas Application (Apps on Facebook.com) 2. Run on a platform - Mobile Application In this slide, we focus on developing Canvas Application
  • 3. Focused Facebook APIs 1. Graph API The Graph API is the core of Facebook Platform, enabling you to read and write data to Facebook “nested query” is not supported by Graph API and in many cases, we need to get the data with multiple Graph API requests 2. FQL (Facebook Query Language) FQL is designed to condense Facebook queries and reduce response size Has similar syntax with SQL but there are somethings that cannot be done in FQL such as No Group by
  • 4. What is Graph API? At Facebook's core is the social graph; people and the connections they have to everything they care about The Graph API presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e. g., people, photos, events, and pages) and the connections between them (e.g., friend relationships, shared content, and photo tags) Every object in the social graph has a unique ID You can access the properties of an object by requesting https: //graph.facebook.com/ID
  • 5. What is FQL? Facebook Query Language, or FQL, enables you to use a SQL-style interface to query the data exposed by the Graph API. It provides for some advanced features not available in the Graph API, including batching multiple queries into a single call You can execute FQL queries by fetching https://api.facebook. com/method/fql.query?query=QUERY. You can specify a response format as either XML or JSON with the format query parameter. Example SELECT name FROM user WHERE uid = me()
  • 6. Facebook Software Development Kit (SDK) Here we are using PHP and Java Script - PHP SDK where source here : https://github.com/facebook/php-sdk/ - Java Script where source here : http://connect.facebook.net/en_US/all.js
  • 7. Application Permissions Applications Permissions http://developers.facebook. com/docs/authentication/permissions Your App got only public data access without request more permission. Likes your app need to post some content "publish_stream" need to be requested.
  • 8. Creating Your Canvas App (1/4) First goto : http://www.facebook.com/developers/ here
  • 9. Creating Your Canvas App (2/4) Your Apps Name here And read the Terms then create the app
  • 10. Creating Your Canvas App (3/4) Apps URL host URL
  • 11. Creating Your Canvas App (4/4) For Apps URL is where user access to your app. Like http://apps.facebook.com/fbpublishpage And host URL is where your Code is located. Here we choose Canvas type as IFrame according to Developer Roadmap
  • 12. Create App Instance get the SDK here : facebook.php or download here : https://github.com/facebook/php- sdk/archives/master
  • 13. Get Session and Login //Get App Session //Get User Info to check the login status //Get login URL (also grants permissions) //Just login if the user did not login
  • 14. Using Graph API to See Feed Result for the code above
  • 15. Using Graph API to Post Status destination user id identification of the author to post the message and this is the result
  • 16. Using FQL to See Picture URL FQL command is like SQL such as SELECT, FROM, WHERE, IN or LIMIT and this is the result
  • 17. Using Javascript with PHP to save ID of a specified friend name //Get current session //Do some FQL call
  • 18. Using JavaScript with PHP to post message to a friend's wall //Send message with Graph API Current UI
  • 19. Result from posting message to a friend's wall result from the program