Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Preface

Preface

With a user base of nearly 800 million people, Facebook is the number one social networking platform. Applications can be created to interact with this huge user base in various ways both inside and outside Facebook. These applications, if developed effectively and efficiently, offer a free medium for promotion and publicity of a product or an organization.

This book focuses on both the concepts and implementations necessary to develop Facebook applications and provides ready-to-use code for common scenarios faced by a developer while creating these applications. It incorporates the newly launched Facebook Graph API along with Facebook Open Graph Beta and also presents the reader with some intuitive ready-to-use applications. This book guides the reader step-by-step, from start to finish, through various stages of Facebook application development.

What this book covers

Chapter 1, Creating a New Facebook Application describes the first step towards developing a Facebook application which includes Facebook application registration process and downloading its PHP - SDK. Here, we will learn how to set up the environment and perform basic authentication to begin with Facebook application development process.

Chapter 2, Be a part of Social Graph presents some recipes to perform the most commonly encountered tasks of application development using the Facebook Graph API through PHP. Here, we will get accustomed to Facebook objects and connections and ways to use them to retrieve data.

Chapter 3, Querying Facebook demonstrates how to use the Facebook Query Language to query Facebook's humongous database for retrieving complex user data.

Chapter 4, Using FB Script shows us how we can access all the features of Graph API using Facebook JavaScript SDK such as to performing authentication and retrieving user data directly at the client side.

Chapter 5, Expressing Yourself provides an insight into Facebook Dialogs. Here, we will learn how to integrate Facebook Dialogs which provide a consistent interface to our applications. Publishing streams, sending friend requests, requesting permissions and so on will become seamlessly easy with these Facebook popup boxes.

Chapter 6, Bringing Facebook to your Website introduces us to the all time favorite Social Plugins. Here we will learn how to integrate Facebook' Social Plugins to a third party application and connect with the Facebook world from virtually anywhere and anytime.

Chapter 7, Connecting Websites to Social Graph shows the users Facebook Open Graph and ways to specify structured information about a webpage which determines how it will be rendered in Facebook. Learn all about Facebook meta tags, their uses, and how to incorporate them into your own web pages.

Chapter 8, Fiddling with Virtual Currency demonstrates how to integrate and use Facebook Credits with our application. This chapter will show us how to use Facebook Credits as a currency to sell our goods and services. It will also teach us how to handle transactions via Facebook Credits API.

Chapter 9, Creating Advertisements and Analyzing Metric Data talks about Facebook Metrices and Ads and recipes to retrieve metric data about our applications. Here, we will learn how to record statistics and understand user interaction with our application.

Chapter 10, Creating Instant Applications houses some readymade exquisite Facebook Applications. Here we will learn to develop few Facebook Applications right from scratch.

Chapter 11, Using Facebook Open Graph Beta introduces us to the newly launched Facebook Timeline and Open Graph Beta. Here, we will learn how to create Facebook objects, actions, and aggregations along with publishing user actions.

What you need for this book

In order to start with Facebook application development you should have a domain name and web hosting space. Your web server should support PHP which is a server-side language.

Who this book is for

This book is written for Facebook developers ranging from novice to expert. It uses PHP, HTML, and jQuery, the most commonly used platforms, to build applications in Facebook.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We use Facebook's in-built XFBML<fb:comments> tag to add the Comment plugin".

A block of code is set as follows:

<iframe src="http://www.facebook.com/plugins/likebox.php?
href=http%3A%2F%2Fwww.facebook.com%2FPacktPub&amp;
width=292&amp;colorscheme=light&amp;show_faces=true&amp;
allowTransparency="true">
</iframe>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<iframe src="http://www.facebook.com/plugins/likebox.php?
href=http%3A%2F%2Fwww.facebook.com%2FPacktPub&amp;
width=292&amp;colorscheme=light&amp;show_faces=true&amp;
allowTransparency="true">
</iframe>

Any command-line input or output is written as follows:

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Fill in the attributes details and click on Get Code".

Warnings or important notes appear in a box like this.


Tips and tricks appear like this.


Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to feedback@packtpub.com, and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail suggest@packtpub.com.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at questions@packtpub.com if you are having a problem with any aspect of the book, and we will do our best to address it.