Mazutaxe So it comes as no surprise that it feels like it was written in a weekend. For example, the bit of code that shows you how to set your API Key variable in the config. Get to Know Us. If you are a seller for this product, would you like to suggest updates through seller support? I now develop applications that have millions of MAU and this was the book that got me started for Facebook Applications. I would not recommend this book for more advanced developers.

Author:Gardagul Tojagor
Country:Trinidad & Tobago
Language:English (Spanish)
Genre:Personal Growth
Published (Last):24 September 2014
PDF File Size:16.17 Mb
ePub File Size:5.86 Mb
Price:Free* [*Free Regsitration Required]

As part of its strategic growth, Facebook developed a platform to enable its users to leverage their own programming skills to extend the Facebook application. The Facebook platform is comprised of a number of REST APIs and client libraries that allow developers to quickly build their own applications for business, for communication, and, well, just for fun. The Facebook platform has allowed community Facebook users to develop popular applications such as Super Wall, Top Friends, and Super Poke that extend the basic functionality of Facebook to include some additional bells and whistles.

These types of chang- es have tapered off, and the numerous enhancements to the language make many com- mon programming tasks much simpler. This book covers many of the important aspects of Facebook application develop- ment, including how to set up an application, language basics, and common pitfalls. In addition, it walks you through building a complete application that enables mul- tiple users to share comments, reviews, and screenshots of their favorite video games. The book closes with brief coverage of methods to monetize your application in order to help offset your incurred server costs.

Have fun! They contain the information you could get based on intensive research yourself or if you were to attend a conference every other week—if only you had the time. They cover the concepts and techniques that will keep you ahead of the technology curve. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.

Rather than use a trademark symbol with every occurrence of a trade- marked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use.

Although every precaution has been taken in the preparation of this work, neither the author s nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.

For Anna and Stella. About the Author. After funding for the project ran out, Wayne took a position at William and Mary where he works to find new ways to integrate new technology into the library and helps scholars from across the country develop online projects for research.

Wayne currently resides in Williamsburg, Virginia, with his wife, Anna; daughter, Stella; and two crazy dogs, Nikki and Jasper. Naval Academy. When not working, Mark enjoys spending time with his wife, Lori, and their friends. The creators of Facebook have done an impressive job focusing their social software on the college demographic.

In a natural progression of the social network, Facebook recently extended its network by developing a platform for developers to create new applications to allow Facebook users to interact in new and exciting ways.

What Is Facebook? In , Facebook launched its own platform for application development. By releasing this platform, Facebook built an apparatus that allows developers to create external applications to empower Facebook users to interact with one another in new and exciting ways—ways that you, as a developer, get to invent.

Not only can you develop web applications, but Facebook has also opened up its platform to Internet-connected desktop applications with its Java client library. By opening this platform up to both web-based and desktop applications and offering to general users the same technology that Facebook developers use to build applications, Facebook is positioning itself to be a major player in the future of socio-technical development. This web site became wildly popular very quickly, reaching the million-user mark within a year.

He created Facemash. To acquire images for the web site, Zuckerberg harvested images of students from the many residence hall web sites at Harvard. Zuckerberg took a leave of absence from Harvard after the controversy and then relaunched his site as a social application for Harvard students in The viral nature of the web site allowed it to grow quickly, and a year later Zuckerberg officially withdrew from Harvard to concentrate his efforts on developing what was first known as thefacebook.

Relaunched as Facebook in , the social network quickly expanded to the rest of the Ivy League. Soon after, Facebook expanded dramatically across university and college campuses across the nation. To keep its growing momentum, Facebook opened its doors to nonacademic users for the first time in Since this time, Facebook has grown to be the second largest social network with more than 30 million users.

And with any growth comes opportunities both for the company and for its users. By using the FBML tag set, Facebook abstracts a lot of complex code and makes many of the routine procedures almost effortless. These calls are really wrappers for more sophisticated FQL interactions with the Facebook back end but are useful bits of code that speed up the development of your application.

Calls like these are useful in giving you granular control of the information you get back from the API. Facebook JavaScript To minimize the threat of cross-site scripting XSS attacks, Facebook implemented its own JavaScript for developers who really want, or need, to use JavaScript in their applications. Facebook formally released FBJS 1.

The following is a quick example of how you can provide a modal dialog box to your users: Show Dialog Box When processed through the Facebook platform, a user will be shown the modal dialog box represented in Figure after clicking the Show Dialog Box hyperlink. Not bad for a single line of code! Figure Modal dialog box 6 Introducing the Facebook Platform Graham Client Libraries The Facebook platform provides many tools to access information, but you are responsible for providing your own business logic through some other language.

However, not everyone in the universe uses Java and PHP exclusively. Introducing the Facebook Platform 7 Graham Summary In this chapter, I briefly went over what the Facebook platform is and outlined some of its technologies and capabilities. I also talked about how Facebook has grown to be the second largest social network on the Web.

This chapter will cover setting up your environment so you can start coding your application. It will also cover some of the tools that Facebook provides you to help develop and debug your code. Getting to know a new platform can be daunting, especially one that has so many facets like the Facebook platform. To help you get your feet wet with the different aspects of the platform, Facebook provides you with a couple tools that let you explore the core API functions, test your Facebook Query Language, and see how your Facebook Markup Language will look in the different areas of the Facebook site.

The Facebook sign-up screen The form asks a few simple questions about you and will send you a confirmation e- mail to verify your e-mail address. After you confirm your account, you have the opportunity to join a network. Once you join a network, you are able to access information about the people in that network. Facebook utilizes both two- and Getting Ready for Facebook Application Development 11 Graham three-column layouts for different parts of its site with a header and footer containing global links.

Except for the header and footer, users can edit their content layout. On the far left of all pages, users have access to the different applications they have installed in the navigation bar. By default, only four appear see Figure , so, depending on how many applications your user has, your application might not appear in their navigation bar.

The Facebook left navigation box When users first log in, they are taken to their canvas page. In Facebook-speak, a canvas page is the wide content on the right side of the web page, as shown in Figure The Facebook canvas page Another important page is the profile page. This is the page you see when you log on to Facebook. The layout on this page is slightly different from the canvas pages. There are still three columns, and the application navigation is still on the left.

However, the content column referred to as wide has shifted to the far right, and it is separated from the application navigation panel by what Facebook calls the narrow column. Setting Up Your Server Since you host your own Facebook application, there is some setup you need to do on your web space. You will need a middleware application server to handle the business logic for your application because Facebook provides methods only for retrieving data and displaying certain information.

Most likely you will be working with one library or the other, so you really need to move only one of the folders to your server to work on your application.

There is a waiting list, but it is a pretty good deal for a really good host. Many of these web sites also have free database hosting usually MySQL , which is a great way to get up and running with Facebook application development. Figure shows the screen that users are presented with when installing a new application. The check boxes allow certain functionality to be performed by the application, and they give users the ability to turn certain aspects of the application on and off.

Essentially, Facebook provides your application to users when it is requested through Facebook. As you can see in Figure , each time a Facebook user interacts with your application, you set off a series of server interactions with the Facebook server farm and your server.

Facebook processes this information and creates an HTML response to the user. Because of the constant passing of information between servers, there is an additional level of complexity that can complicate tracking down bugs. At this point, you need to tell Facebook about your application. Setting up a new application The only required fields are the application name and the one confirming you have read the terms of service.

However, to really do anything with an application, you will need to fill out the optional fields. Because of this prohibition, you are precluded from using words such as surface and faceted as part of your application name. A good thesaurus can help you get a bit more creative with your application names.

In the optional fields, you can fill out more information about how your application works see Figure Perhaps the most perplexing field here is the Callback URL field. Optional fields for Facebook application registration The following are the optional fields: Support E-mail: This is the e-mail contact for support questions for your application. If you need to lock down your application to a list of servers, this is where you add that information.

Requests from other servers are then rejected. Can your application be added on Facebook? If you use this, users must accept the terms of service before they can use your application.

Developers: Your name should appear in this field by default. As with any terms of service agreement, there are certain prohibitions that you should be aware of in terms of what is, and is not, permissible.

There have been some recent changes to the Facebook terms of service that are designed to clarify some of the gray areas in the guidelines, and these will most likely continue to change as unscrupulous people look for loopholes.

You should also not store any more information than you need from your users to make your application function. I find it useful in my day-to-day programming to be able to see the data I expect to have returned in order to speed development. Simply select the friends. This will return an XML structure with a root element of. Not only can you switch between the different API calls, but you can also change response formats to see what you will get when you change the Response Format field.


Facebook API Developers Guide









Related Articles