Jesse Stay Social media consultant and developer Learn to: • Install the Facebook toolkit and use the Graph API • Use Facebook Markup Language and Facebook Query Language • Create applications for marketing and making money • Boost your brand with a Facebook page Facebook ® Application Development Making Everything Easier! ™ Open the book and find: • How to create developer and test accounts • Tips for setting up an app-hosting foundation • Steps for creating a 5-minute app • How to recreate your Web site within Facebook • Integration points and how to use them • Cool ways to use Social Plugins • How to translate your Web site into multiple languages • Pitfalls to avoid Jesse Stay is a social media technologist, consultant, and developer who specializes in Facebook and related technologies that enable business owners to reach their customers in a viral manner. He is Social Media Director for the LDS Church as well as founder and CEO of Stay N Alive Productions. $29.99 US / $35.99 CN / £21.99 UK ISBN 978-0-470-76873-0 Programming/Application Development Go to Dummies.com ® for videos, step-by-step examples, how-to articles, or to shop! Learn to choose your platform, plan your strategy, and spread your message with Facebook! Ready to build the next knockout Facebook app? Whether you’re starting out with a humble (but useful!) HTML tag to welcome visitors to your Facebook page or planning a fully integrated Web site that connects your visitors with their Facebook friends, this book has the scoop. If you know just a bit about HTML and basic scripting, you’re ready to go! • Find the fish — see how you can put your product or service before Facebook users and “fish where the fish are” with apps and Pages • Get the tools — check out the Facebook Developer app and choose a text editor, hosting service, and scripting language • Explore APIs — learn about OAuth 2.0, Graph API, Real-Time Objects, the Search API, and more • Make it mobile — program your app on the iPhone ® or Android ™ Facebook SDK • Be businesslike — turn app development into a business, advertise and sell your apps, and keep up with the rules Facebook ® Application Development Stay www.it-ebooks.info Start with FREE Cheat Sheets Cheat Sheets include • Checklists • Charts • Common Instructions • And Other Good Stuff! Get Smart at Dummies.com Dummies.com makes your life easier with 1,000s of answers on everything from removing wallpaper to using the latest version of Windows. Check out our • Videos • Illustrated Articles • Step-by-Step Instructions Plus, each month you can win valuable prizes by entering our Dummies.com sweepstakes. * Want a weekly dose of Dummies? Sign up for Newsletters on • Digital Photography • Microsoft Windows & Office • Personal Finance & Investing • Health & Wellness • Computing, iPods & Cell Phones • eBay • Internet • Food, Home & Garden Find out “HOW” at Dummies.com *Sweepstakes not currently available in all countries; visit Dummies.com for official rules. Get More and Do More at Dummies.com ® To access the Cheat Sheet created specifically for this book, go to www.dummies.com/cheatsheet/facebookapplicationdevelopment Mobile Apps There’s a Dummies App for This and That With more than 200 million books in print and over 1,600 unique titles, Dummies is a global leader in how-to information. Now you can get the same great Dummies information in an App. With topics such as Wine, Spanish, Digital Photography, Certification, and more, you’ll have instant access to the topics you need to know in a format you can trust. To get information on all our Dummies apps, visit the following: www.Dummies.com/go/mobile from your computer. www.Dummies.com/go/iphone/apps from your phone. www.it-ebooks.info Facebook ® Application Development FOR DUMmIES ‰ 01_9780470768730-ffirs.indd i01_9780470768730-ffirs.indd i 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info 01_9780470768730-ffirs.indd ii01_9780470768730-ffirs.indd ii 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info by Jesse Stay Facebook ® Application Development FOR DUMmIES ‰ 01_9780470768730-ffirs.indd iii01_9780470768730-ffirs.indd iii 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info Facebook ® Application Development For Dummies ® Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright © 2011 by Wiley Publishing, Inc., Indianapolis, Indiana Published by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permit- ted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http:// www.wiley.com/go/permissions. Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/ or its af liates in the United States and other countries, and may not be used without written permission. Facebook is a registered trademark of Facebook, Inc. All other trademarks are the property of their respec- tive owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITH- OUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZA- TION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit www.wiley.com/techsupport. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Control Number: 2011926323 ISBN: 978-0-470-76873-0 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 01_9780470768730-ffirs.indd iv01_9780470768730-ffirs.indd iv 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info About the Author Jesse Stay began his career at age 10 as a developer writing BASIC programs in his spare time. He would frequently be found copying programs from the back of 3-2-1 Contact magazines and reading ahead, way ahead, in the books of his computer programming classes in high school. In third grade, Stay won third place in his elementary school computer fair, going against the likes of kids several years older than he was. For his Boy Scout Eagle Scout project, Stay wrote a computer program in Pascal to help track the blood types of those in his local church congregation. At the same time, as an avid entrepreneur, Stay was always looking for the next way to make money — from the lemonade stands as a kid, to selling T-shirts from the artwork of others in his high school art class, to his own lawn-mowing business. He always had a knack for making money “grow on trees,” something his parents always told him wasn’t possible. Later on in life, Stay worked under the direction of the VP of marketing at CWDKids.com. It was there that he was put in charge of helping with the af li- ate marketing and search engine marketing programs for the company. He built many scripts in both Perl and VBA to help in this effort. Later, at Media General (a publishing company, owner of many news organizations through- out the Southeast), Stay worked to make print classi eds pro table online by developing creative techniques to help customers nd what they were look- ing for. He took that knowledge to BackCountry.com, where he built an inno- vative ad management platform to build and buy thousands of ads, saving the company thousands while increasing sales. It was the combination of his background in SEM, af liate, and classi ed ad tools and management; his entrepreneurial spirit; and his passion for pro- gramming that drove Stay to realize the power of social networking APIs and Facebook Platform. Stay quickly realized that with social networking, his soft- ware could sell itself. In 2007, Stay left his full-time job to start his own consulting company. Since then, Stay has written three books on Facebook and Facebook development; consulted for some of the most successful brands in social media; opened his own startup, SocialToo.com, which Stay still runs today; and built a suc- cessful blog with thousands of followers. Stay has also written developer documentation online for Facebook itself as a contractor. Even today, Stay believes in making money “grow on trees” through entrepreneurship and savvy business techniques. 01_9780470768730-ffirs.indd v01_9780470768730-ffirs.indd v 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info Stay maintains and administers numerous Facebook Pages with fans num- bered in the hundreds of thousands and Twitter accounts with followers in the tens of thousands, and he has written for some of the top blogs on the Internet. Three of those include InsideFacebook.com, AllFacebook.com, and LouisGray.com. Stay has been named by Mashable.com as one of 20 developers to follow on Twitter and one of 10 entrepreneurs to follow on Twitter. Stay was also named by Entrepreneur magazine as one of 20 developers to follow on Twitter by Mashable’s Ben Parr. Stay currently works (he calls it service) as social media architect and man- ager of social strategy and solutions for The Church of Jesus Christ of Latter- day Saints (the Mormons). In his current position, Stay gets to help build relationships and social technologies for some of the largest humanitarian organizations in the world. In addition to that, Stay works with the Mormon Tabernacle Choir on its social strategy, as well as FamilySearch.org, which has the world’s largest database of linked individuals (Stay proudly calls it the world’s largest social network). Stay believes rmly in using “social” tech- nologies to build fruitful relationships that have a strong effect on the world. Stay has keynoted for major conferences and has spoken all over the United States. He has spoken at some of the largest Facebook conferences in the world, and he loves to share with others how they can learn just a “little more” to gain that extra edge on Facebook strategy. Stay has spoken and con- tinues to speak for both business professionals and marketers, and develop- ers, and has a knack for making both audiences come out enlightened. In his spare time, Stay likes to play trumpet, work in his garden, hike, moun- tain bike, and travel the world. Stay speaks uent Thai and loves interna- tional culture. Stay has ve kids and a beautiful wife and, most of all, enjoys spending time at home with his family. 01_9780470768730-ffirs.indd vi01_9780470768730-ffirs.indd vi 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info Dedication To Rebecca, Elizabeth, Thomas, Joseph, Jesse III, and Baby on the way. Without them, this couldn’t have been possible. I’m especially grateful to my wife, who has shown great patience in allowing me to spend almost a year writing this, all while I was working a full-time job, running a company on the side, speaking, and consulting, along with everything else I do. She keeps me going, and she continually amazes me how she’s able to support me in everything I do. It is she who inspires me to keep on pushing harder. She made this possible. Author’s Acknowledgments If you’re not included here, I’ve probably thanked you in person already. If not, I apologize, because it’s impossible to include everyone who made this possible. Thanks to my family for supporting me along the way. Thanks to my boss, and those who work with me, for being exible enough to allow me to nish this while working a full-time job (and running a company on the side!). A special thank-you to each and every blog or news organization that has ever covered me or my companies and books over the years: Mashable, TechCrunch, ReadWriteWeb, TheNextWeb, Venturebeat, New York Times, to name a few — I’m very grateful. I’ve tried to say thank you back by includ- ing each and every one under http://delicious.com/jessestay/ coverage. Thanks to some of my dearest advisors and mentors over the years. I truly look up to them, and they have made much of what I do possible through their advice and shared knowledge — they are all dear friends: Guy Kawasaki, Jason Alba, Louis Gray, Rodney Rumford, and Jeremiah Owyang, to name a few. I treasure each chance I get with them to learn something new. Thanks to Stephan Heilner and Ray Hunter for their contributions to the mobile chapter. They are two of the best mobile developers I know, and they were invaluable in helping to make that chapter interesting. Thanks to Katie Feltman, Christopher Morris, and the entire team at Wiley for being so patient with me as I wrote this. The Wiley team has been one of the most pleasant publishers to date to work with, and I’ve thoroughly enjoyed my experience with them thus far. A special thanks to Allan Carroll, one of the best Facebook developers I know, who graciously was willing to help with the tech edits. Be sure to try out his new service, Piick.com, if you get a chance. Lastly, thank you to my mother and father. They brought me into this world, and I’ve treasured the advice they’ve given me over the years to make me the person who I am. You are two of the smartest individuals I know. 01_9780470768730-ffirs.indd vii01_9780470768730-ffirs.indd vii 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info Publisher’s Acknowledgments We’re proud of this book; please send us your comments at http://dummies.custhelp.com. For other comments, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. Some of the people who helped bring this book to market include the following: Acquisitions, Editorial, and Media Development Sr. Project Editors: Christopher Morris, Kelly Ewing Acquisitions Editor: Katie Feltman Copy Editor: John Edwards Technical Editor: Allan Carroll Editorial Manager: Kevin Kirschner Media Development Project Manager: Laura Moss-Hollister Media Development Assistant Project Manager: Jenny Swisher Media Development Associate Producers: Josh Frank, Marilyn Hummel, Douglas Kuhn, and Shawn Patrick Editorial Assistant: Amanda Graham Sr. Editorial Assistant: Cherie Case Cartoons: Rich Tennant (www.the5thwave.com) Composition Services Project Coordinator: Kristie Rees Layout and Graphics: Joyce Haughey, Julie Trippetti Proofreader: Debbye Butler Indexer: Ty Koontz Publishing and Editorial for Technology Dummies Richard Swadley, Vice President and Executive Group Publisher Andy Cummings, Vice President and Publisher Mary Bednarek, Executive Acquisitions Director Mary C. Corder, Editorial Director Publishing for Consumer Dummies Diane Graves Steele, Vice President and Publisher Composition Services Debbie Stailey, Director of Composition Services 01_9780470768730-ffirs.indd viii01_9780470768730-ffirs.indd viii 4/4/11 8:48 AM4/4/11 8:48 AM www.it-ebooks.info [...]... Instagram 353 Chapter 18: Top Ten Facebook Application Development Resources 355 Facebook s Developer Forum 355 Facebook Application Development For Dummies — the Facebook Group 358 Facebook Application Development For Dummies — the Facebook Page 360 Contacting Facebook 362 Facebook Developer Documentation 363... Basics of a Facebook Application 7 Chapter 1: Getting Acquainted with Facebook Application Development 9 What’s a Facebook Application? 9 Understanding the Facebook Application Development Process 10 Picking a Platform That Works Right for You 12 Fishing where the fish are 12 From fishers to farmers 16 Releasing your application. .. understand what I’m talking about You can find other For Dummies books for those topics Of course, you can always ask in this book’s Facebook group if you ever have any questions (stay.am/dummiesgroup) www.it-ebooks.info 3 4 Facebook Application Development For Dummies How This Book Is Organized I try to take you through all the different parts of Facebook development in this book I try to cover it all You’ll... what a Facebook application is and why you might want to consider using such a thing However, there may be a good chance you’ve never even touched Facebook Platform before and you want to find out why so many other developers and businesses are interested in Facebook Facebook applications basically come in two forms: ✓ Facebook hosted This is typically what most people mean when they say Facebook application. ”... site, or you can make simple requests to Facebook to get and render information about your users that are also on Facebook I cover all that in detail later Picking a Platform That Works Right for You You have two ways of developing on Facebook Each of these ways makes for a different platform of development The term Facebook Platform in general just means accessing Facebook s APIs to access these two methods,... Your Facebook Application into a Legitimate Business 283 Chapter 15: Helping Your Business and Brand Benefit from Facebook 285 Chapter 16: Preparing for the Worst: What Every Facebook Application Developer Should Know 325 www.it-ebooks.info Part VI: The Part of Tens 335 Chapter 17: Ten Successful Facebook Applications 337 Chapter 18: Top Ten Facebook Application Development. .. application. ” Facebook allows developers, companies, and brands to build their own Web sites right on Facebook. com, which includes Facebook s own headers and footers When you build a www.it-ebooks.info 10 Part I: Understanding the Basics of a Facebook Application Facebook- hosted application you are in essence making an extension of Facebook itself Users of your Facebook- hosted application never have to leave Facebook. .. important is that you know where to go to get information Facebook Platform is a living, breathing platform It changes frequently You should always check back to developers .facebook. com, look on this book’s Facebook Page at facebook. com/dummiesbook, reference the book’s Web site at staynalive.com/dummiesbook, or ask a question in the book’s Facebook group at stay.am/dummiesgroup if you are ever in doubt You... showing you what a Facebook application is and how you can get acclimated in the Facebook environment I show you how to build your first Facebook application, and where you can find help I even show you all the elements you need to know to set up your application www.it-ebooks.info Chapter 1 Getting Acquainted with Facebook Application Development In This Chapter ▶ Knowing where to build your application. .. your hands dirty with Facebook Platform This book should be very easy for both audiences to read Facebook is a constantly changing environment This is especially true with Facebook Platform For this reason, I try to remind you in every place possible where you can go to get the latest information If you ever have any questions, just ask them in this book’s Facebook group at stay.am/ dummiesgroup www.it-ebooks.info . Developer Forum 355 Facebook Application Development For Dummies — the Facebook Group 358 Facebook Application Development For Dummies — the Facebook Page. Publishing logo, For Dummies, the Dummies Man logo, A Reference for the Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies. com, Making