Developing Facebook Application

Text-only Preview

Developing Facebook Application Wasu KhaodeeKanda Runapongsa SaikaewComputer Engineering Khon Kaen UniversityFacebook Application Types1. Run on web-browser 1.1 A Website 1.2 Canvas Application (Apps on Facebook.com) 2. Run on a platform - Mobile ApplicationIn this slide, we focus on developing Canvas ApplicationFocused Facebook APIs1. Graph APIThe 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 sizeHas similar syntax with SQL but there are somethings that cannot be done in FQL such asNo Group by What is Graph API?At Facebook's core is the social graph; people and the connections they have to everything they care aboutThe 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/IDWhat 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 callYou 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.ExampleSELECT 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.jsApplication PermissionsApplications Permissions http://developers.facebook.com/docs/authentication/permissionsYour 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/hereCreating Your Canvas App (2/4)Your Apps Name hereAnd read the Termsthen create the appCreating Your Canvas App (3/4)Apps URL host URL