Online Book Reader

Home Category

Facebook Cookbook - Jay Goldman [46]

By Root 626 0
interface challenges you are likely to come up against. There are standards already developed for tabbed navigation, selectors, item lists, menus, icons, sliders, forms, dialogs, and many of the other interface elements you are likely to need for your own application (see Figure 4-17).

Figure 4-17. Tabbed navigation, menus, and buttons

The most robust and simplest way to take advantage of Facebook’s existing user interface elements is to tap into them directly with FBML. Using this proprietary markup language, you can pull directly from Facebook’s own toolkit to build tabbed navigation, dialog boxes, headings, forms, and other elements. The Facebook Developers Wiki has a full list of FBML tags and how to use them.

There are many advantages to using FBML. Most importantly, people who use your application are already familiar with these standard interface elements because they have been using them elsewhere on Facebook. FBML elements look familiar and behave in a consistent way across the site and across different applications, no matter what those applications are for. You can also avoid reinventing the wheel. Developing your application will be faster and will have fewer bugs by taking advantage of prefabricated FBML code that has been tested extensively. By relying on FBML, you will also be future-proofing your application. When Facebook upgrades its user interface, you will immediately reap the benefits because your own interface will be upgraded seamlessly. For instance, should Facebook improve its tabbed navigation design, your own tabs will reflect those improvements without any effort on your part.

Although FBML has many common elements, you will find occasions where custom interface elements are necessary. In these cases, try to fall back onto de facto standards—become familiar with Facebook’s default user interface and how other Facebook application developers have tackled similar issues. If you can copy or mimic other common implementations of user interface elements, you will reap many of the same benefits as using FBML. Your users will find your application more intuitive if they are already familiar with elements you are using (for example, Figure 4-18). Facebook even documents on its Wiki how to copy some of the common elements that are available as FBML (http://wiki.developers.facebook.com/index.php/Facebook_Styles).

Figure 4-18. Two list table

All of this said, there is room for branding your application and inserting your own style into the work. Build a strong foundation of standard user interface elements to create a highly usable and efficient application, and then integrate your brand in a meaningful way.

Chapter 5. Setting Up Your Environment


The difference between churning out beautiful code and pounding your head against the wall can often come down to getting your environment configured properly. This chapter covers some of the things you need to do to become a Facebook developer, and also some of the things you should really check out to make your life a whole lot easier.

Creating a Test Account


Problem


I want to test my application as another user who isn’t a developer, but the Facebook ToS prevent me from creating accounts that aren’t linked to my real identity. What’s a poor developer to do?

Solution


The Facebook team realized that they were caught in a vicious cycle in which developers were creating fake accounts for testing and the Facebook police were disabling them as fakes, thereby upsetting the developers who then created more accounts, thereby making more work for the police, etc., etc., ad infinitum. Facebook put an end to the problem by giving us the ability to mark an account as a “test account,” which has most of the privileges of a real account but with the notable exception of not being able to see “real” Facebook users or owning Platform applications.

Making a test account is really easy: just create a new Facebook account and then go to http://www.facebook.com/developers/become_test_account.php while you’re logged into it. You’ll be shown a

Return Main Page Previous Page Next Page

®Online Book Reader