- ホーム
- > 洋書
- > 英文書
- > Internet / Web Programming
Full Description
In The Developer's Guide to Social Programming, Mark Hawker shows developers how to build applications that integrate with the major social networking sites. Unlike competitive books that focus on a single social media platform, this book covers all three leading platforms: Facebook, OpenSocial, and Twitter. Hawker identifies the characteristics of superior, highly engaging social media applications, and shows how to use the Facebook platform, Google Friend Connect, and the Twitter API to create them. You'll find practical solutions and code for addressing many common social programming challenges, from site registration to search, blog commenting to creating location-based applications. Hawker concludes by walking you through building a complete, integrated social application: one that works seamlessly across all leading platforms, and draws on powerful features from each. Coverage includesWorking with the Twitter API, including the Search API, Lists API, and Retweets API Authenticating users with Twitter OAuth Mastering the Facebook API, FQL, and XFBML Utilizing the Facebook JavaScript Library for creating dynamic content, and animation Exploring the Google Friend Connect JavaScript API, and integrating with the OpenSocial API Using Facebook's tools for sharing, social commenting, stream publishing, and live conversation Using the PHP OpenSocial Client Library with Google Friend Connect Creating, testing, and submitting Google Friend Connect gadgets
Contents
I1 Working with the Twitter API 1Twitter API Essentials 1Twitter API Methods 3Twitter API Parameters 6Twitter API Return Formats 10Accessing the Twitter API 11cURL 12Twitter-async 14Twitter API Rate Limiting 17Twitter API Error Handling 18Summary 192 Diving Into the Twitter API Methods 21Twitter API Methods 21User Objects 23Status Objects 26Direct Message Objects 28Saved Search Objects 29ID Objects 30Relationship Objects 31Response Objects 32Hash Objects 33Twitter Search API 34Introducing the Atom Syndication Format 34Twitter Search API Methods 38Summary 433 Authentication with Twitter OAuth 45Introducing Twitter OAuth 45OAuth Benefits 46OAuth Definitions 46Implementing Twitter OAuth 48Twitter OAuth Workflow 48Test Tube: A Sample Twitter Application 50Summary 594 Extending the Twitter API: Retweets, Lists,and Location 61Extending Twitter's Core Functionality 61Retweet API 62Lists API 64Geolocation API 68Twitter Community Evolution 71Platform Translations 71Spam Reporting 72Future Directions 74Summary 76II: Facebook Platform5 An Overview of Facebook Platform WebsiteIntegration 77Facebook Platform for Developers 77Facebook Platform 78Registering a Facebook Application 79Referencing a Facebook Platform Application 81Facebook API, FQL, and XFBML 84Facebook API and FQL 84XFBML 97Summary 986 Registration, Authentication, and Translations with Facebook 99User Authorization and Authentication 99Logging In and Detecting Facebook Status 101Logging Out, Disconnecting, and ReclaimingAccounts 107Connecting and Inviting Friends 109Translations for Facebook 111Preparing Your Application and Registering Text 111Administering and Accessing Translations 113Summary 1147 Using Facebook for Sharing, Commenting, and Stream Publishing 115Content-Sharing and Live Conversation 115Facebook Share 116Facebook Widgets 118Social Commenting and Stream Publishing 120Comments Box 120Open Stream API 123Summary 1358 Application Discovery, Tabbed Navigation, and the Facebook JavaScript Library 137Application Dashboards and Counters 138News and Activity Streams 139Games and Applications Counters 143Navigating and Showcasing Your ApplicationUsing Tabs 145Configuring and Installing an Application Tab 146Extending an Application Tab 149Dynamic Content and the FacebookJavaScript (FBJS) Library 157Facebook Animation Library 157Facebook Dialogs 160Handling Events with an Event Listener 162Summary 164III: Google Friend Connect9 An Overview of Google Friend Connect 165Components of Google Friend Connect 165Google Friend Connect Gadgets 166Google Friend Connect JavaScript API 167Server-Side Integration 167Google Friend Connect Plug-ins 168Using the Google Friend Connect JavaScript API 169Installing and Configuring the JavaScript Library 169Working with Google Friend Connect Data 171An Overview of the OpenSocial API 173OpenSocial API Methods 173The DataRequest Object 174Fetching People and Profiles 176Fetching and Updating Activities 177Fetching and Updating Persistence 178Color Picker: A Google Friend Connect Application 181Summary 19110 Server-Side Authentication and OpenSocial Integration 193Server-Side OpenSocial Protocols and Authentication Methods 193Google Friend Connect Authentication Methods 194OpenSocial Client Libraries 196Using the PHP OpenSocial Client Library with Google Friend Connect 197Google Friend Connect Authentication Workflow 197Setting Up a Server-Side Application 198OpenSocial Data Extraction Principles 201Summary 20711 Developing OpenSocial Gadgets with Google Friend Connect 209An Overview of Google Gadgets 209Anatomy of an OpenSocial Google Gadget 210OpenSocial v0.9 Specification 214Advanced OpenSocial Gadget Development 217Creating a Google Gadget 222Color Picker, Revisited 222Testing, Tracking, and Directory Submission 230Summary 233IV: Putting It All Together12 Building a Microblog Tool Using CodeIgniter 235An Overview of CodeIgniter 235The Model-View-Controller Architectural Design 236Installing, Configuring, and Exploring CodeIgniter 237CodeIgniter Libraries 240CodeIgniter Helpers 245Building the Basic Sprog Application 246Stage 1: Creating the Registration, Login, and Home Pages 247Stage 2: Extending the Sprog Application with Updates, Comments, and Likes 257Summary 26613 Integrating Twitter, Facebook, and Google Friend Connect 267Implementing Twitter Functionality 267Setting Up Twitter and Twitter-async Support 268Stage 3: Extending the Sprog Application with Twitter Functionality 270Updating a User's Twitter Account 276Implementing Facebook Functionality 279Registering a Facebook Application and Adding Facebook Support 279Stage 4: Extending the Sprog Application with Facebook Functionality 281Implementing Google Friend Connect Functionality 292Registering and Adding Google Friend Connect Support 292Stage 5: Extending the Sprog Application with Google Friend Connect Functionality 294Summary 301Index 303