Book description
Want to build Facebook applications that truly stand out among the thousands already available? In addition to providing easy-to-follow recipes that offer practical ways to design and build scalable applications using the Facebook Platform and its new profile design, this Cookbook also explains proven strategies for attracting users in this highly competitive environment.
With plenty of examples and practical solutions, Facebook Cookbook answers some of the hardest questions Facebook application developers contend with -- including how and where to get started. This Cookbook will help you:
- Learn to build an application that scales to accommodate a sudden influx of users
- Explore changes from Facebook's old profile design to the new look and feel
- Take advantage of new integration points in the new profile design
- Get tips for designing applications with hosting and deployment costs in mind
- Discover which widgets and controls to use for building the most attractive user interface design
- Learn the differences between standard HTML, JavaScript, and SQL, and the versions used on the Facebook Platform
- Target large, defined groups on Facebook, including those who want to find jobs, hire employees, market a business, advertise, and more
If you can build simple web applications with HTML, Facebook Cookbook will help you build applications with the potential to reach millions of users around the globe. Learn what it takes to design applications that stand above the rest.
Table of contents
-
Facebook Cookbook
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
- Contributors
- Preface
- 1. Introducing Facebook Platform
-
2. Ideation and Strategy
- Which Types of Apps Are the Most Popular?
- Which Apps Are Most Popular?
- Test-Driving Ideas with Facebook Polls
- The Winning Formula for Facebook
- Where’s the Money?
- Google AdSense and Facebook
- Funding Facebook Development
- Facebook Platform Integration Points
- Application Directory
- Navigating the Applications Menu
- Facebook Canvas Pages
- Think Outside the Profile Box
- Info Sections
- News Feed and Mini-Feed
- Noteworthy Notifications
- Understanding Allocations
- Attachments and the Publisher
- Requests
- Tabs
- Guiding Principles of App Strategy
- Community Gardening
- Finding Inspiration
- 3. Hello World
-
4. Architecture and Design
- Under the Hood: How Facebook Apps Work
- Architecting for the Future: Open Web Apps
- Build Now, Scale Later: Getting Real
- Scalability
- Language Selection As Architecture
- Cross-Language Development with Facebook Thrift
- The Database Is Dead! Long Live memcached!
- Advanced Caching with Nginx and memcached
- Standing on the Shoulders of Giants: Hosting with Amazon Web Services
- Integrating Drupal and Facebook
- App Design Process
- The Facebook User Interface Widgets
- Facebook’s Global User Interface
-
5. Setting Up Your Environment
- Creating a Test Account
- Facebook Clients
- JavaScript Client Library
- Starting Out in PHP
- Demo Applications
- Developer Documentation
- Test Consoles
- Developer Forums: Help!
- Facebook Bug Squashing
- Facebook Developer Software Toolbox
- Weekly Facebook Pushes
- Hosting
- Amazonian Backends: Simple Storage Solution
- Amazonian Backends: Hosting on Elastic Cloud Computing
- Staying Up-to-Date
-
6. Facebook Markup Language (FBML)
- What Is FBML?
- Categories of FBML Tags
- FBML Versions
- A Rose by Any Other Name: Forced Renaming
- Web Standards
- Displaying a User’s Name
- He Said, She Said: Dealing with Pronouns
- Worth a Thousand Words: Profile Pictures
- Linking to Events
- Linking to Groups
- Linking to Networks
- Display Content to Group Members
- Display Content to Network Members
- Displaying Content to App Users
- Displaying Content to Friends
- Displaying/Hiding Content to/from Specific Users
- Displaying Random Content
- Displaying Content to Specific Browsers
- Displaying Your Application’s Name
- Formatting Relative Time
- Making Content Visible to Some Users in Profile Boxes
- Hiding Private Profile Content
- Hiding Private Photos
- Embedding an iFrame
- Embedding Facebook Photos
- Embedding MP3s
- Embedding Adobe Flash
- Embedding Flash Video
- Embedding Microsoft Silverlight
- Wide Versus Narrow Profile Boxes
- Tabling Users
- Page and Box Titles
- Profile Box Subtitles
- Forms the Facebook Way
- Heads Up! Heading Your App Pages
- Dashing Dashboards: Heading Your App Pages
- Tabs Ahoy!
- Media Headers
- Errors, Explanation, and Success: Displaying Messages (Oh My!)
- Discussion Boards Made Simple
- Giving Users a Voice: Wall Posts in Your App
- Adding Profile Boxes and Info Sections
- Prompting for Extended Permissions
- You Can Pick Your Friends
- You Can Pick Your Friends (in Batches)
- Invitations and Requests
- Predicting the Future with Type-Ahead Controls
- Using FBML Inside FBJS
- Dialogs That Pop
- Dialogs in Context
- Dialogs with Ajax
- Facebook Share Buttons
- Feed Forms: Publishing Feed Stories from FBML
- Redirecting to a Different URL
- Painless Image Submitting
- Hunting for Robots: CAPTCHA in Your App
- FBML Caching
- Analyzing Traffic with Google Analytics
- Translations
- Valid HTML Tags
- Facebook and CSS: FBSS?
- Beating the CSS, JavaScript, and Image Cache
-
7. Facebook JavaScript (FBJS)
- Dealing with Sandbox Renaming
- Losing Your < >s
- Retrieving DOM Elements
- Manipulating DOM Elements
- Manipulating CSS Styles
- Manipulating CSS Class Names
- Dynamically Setting Content
- Textbox Selections
- Limiting the Length of Text Fields
- Creating Elements Dynamically
- Adding and Removing Event Listeners
- Retrieving Data via Ajax
- Displaying Pop-Up Dialogs
- Displaying Contextual Dialogs
- Avoiding Heartache When the DOM Changes
- Linking to External FBJS Files
- Use Firebug (No, Seriously)
- Accessing the DOM Behind FBJS
- Ajax Library: Backface
-
8. Facebook Query Language (FQL)
- Playing with FQL
- FQL Query Structure
- Functions and Operators
- Indexed Facebook Tables and Fields
- Advanced Relational Database Table Optimization
- Album Table
- Retrieving an Album
- Counting All of a User’s Photos
- Retrieving Five Albums for a User
- Cookie Table
- Retrieving All Cookies for a User
- Retrieving a Specific Cookie
- Retrieving All Cookies for a Specific Path
- Metrics Table
- Retrieving Yesterday’s Metrics
- Retrieving Metrics for a Date Range
- Alerting Yourself
- Event Table
- Event Member Table
- Retrieving an Event
- Retrieving Events Created by a User
- Retrieving a User’s Events
- Retrieving a User’s Events with a Specific RSVP
- Retrieving Events Two Users Are Attending
- Friend Table
- Friend Request Table
- Retrieving a User’s Friends
- Checking Whether Two Users are Friends
- Retrieving a User’s Pending Friend Requests
- Checking for a Friend Request Between Two Users
- Friend List Table
- Friend List Members Table
- Retrieving a User’s Friend Lists
- Retrieving a Specific Friend List
- Retrieving Friends in Friend Lists
- Retrieving Friends in a Specific Friend List
- Groups Table
- Group Member Table
- Retrieving a Specific Group
- Retrieving a User’s Groups
- Checking Whether Two Users Are in the Same Group
- Listing Table
- Retrieving a Listing
- Retrieving a User’s Listings
- Retrieving a User’s Friends’ Listings
- Retrieving a User’s Listings by Category
- Page Table
- Page Fan Table
- Retrieving a Page
- Retrieving a User’s Pages
- Photo Table
- Photo Tag Table
- Retrieving the 10 Most Recent Photos from a User
- Retrieving All Photos a User Is Tagged In
- User Table
- App Friends
- Birthday Friends
- 600 Errors
- Preload FQL
-
9. Facebook API
- What’s an API?
- Getting Started with the Client Library
- RESTing with Facebook
- Storable Data
- Authenticating Users
- Creating a Session Key
- Creating an Infinite Session Key
- Getting a Session (Desktop Only)
- Creating an Auth Token (Desktop Only)
- Making Calls (Desktop Only)
- Logging Out
- Getting Allocations
- Getting Metrics
- Getting and Setting Application Properties
- Getting an App’s 4-1-1
- Batching Calls
- Getting and Setting Cookies
- Getting Events
- Getting Event Members
- Refreshing FBML Caches
- Getting a (Ref) Handle on FBML
- Three Story Sizes: Working with Template Bundles
- Publishing News and Mini-Feed Stories
- Story Aggregation
- Setting Info Sections
- FQL Queries
- Friends?
- Get Friends
- Get Friends Who Use My App
- Get Friend Lists
- Get Groups
- Get Group Members
- Creating/Modifying Marketplace Listings
- Get Marketplace Listings
- Get Marketplace Categories and Subcategories
- Deleting Marketplace Listings
- Searching the Marketplace
- Sending Notifications
- Get Notifications
- Get Pages
- Checking Page Properties
- Create a Photo Album
- Get Photo Albums
- Get Photos
- Uploading a Photo
- Adding Tags to Photos
- Getting and Setting Profile FBML
- Get a User’s Info
- Get Logged-In User
- Has a User Added My App?
- Setting Status
- Extended Permissions
- Checking Extended Permissions
- Storing Data with the Data Store API
- Granting Permissions to Other Applications Via the Permissions API
- Post-Remove (Uninstall) URL
- Adding Missing PHP Client Library Methods
- Error Codes
-
10. Marketing Your App
- Attracting Users Through Facebook Ads
- Monetize, Measure, and Market with SocialMedia
- Social Network Advertising with Cubics
- Other Ad Networks
- Spreading Your App via Google AdWords
- Measuring Your Success
- Work the Integration Points
- Continuous Improvement Through A/B Testing
- The Great Apps Program
- Application Verification Program
- Index
- About the Author
- Colophon
- SPECIAL OFFER: Upgrade this ebook with O’Reilly
Product information
- Title: Facebook Cookbook
- Author(s):
- Release date: October 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596554095
You might also like
book
Sams Teach Yourself Facebook® for Business in 10 Minutes: Covers Facebook Places, Facebook Deals and Facebook Ads
Facebook Places and Deals are two new services that are likely to extend Facebook's Web dominance …
book
Essential Facebook® Development: Build Successful Applications for the Facebook Platform
“What sets this title apart is the authors’ deep insight of how to leverage the Facebook …
book
HTML5 Geolocation
Truly revolutionary: now you can write geolocation applications directly in the browser, rather than develop native …
book
Mac OS® X Tiger™ Unleashed
A best-seller that once showed you how to reign in a panther can now show you …