Chapter 8. Social integration with Twitter and Facebook

 

This chapter covers

  • Accessing accounts with the Accounts framework
  • Retrieving and displaying a Twitter or Facebook feed
  • Integrating with Twitter’s API and Facebook’s OpenGraph
  • Posting content to Twitter or Facebook

Facebook and Twitter are two social networking services that have invaded the daily lives of so many of us—so much so that Apple has decided to integrate the two directly into iOS. People can share photos, videos, links, and other types of content using either service directly from iOS. Previously, developers would have to supply their own integrations or resort to using third-party libraries to include this functionality within their applications. Now it’s possible to use both of these services within your apps using libraries that are part of the iOS SDK.

Because there is now a centralized place within iOS to store these accounts, you can give apps permission to securely use their credentials to interact and share content with Twitter, Facebook, and Weibo. Within this chapter you’ll learn how to interact with Twitter and Facebook by using the Accounts and Social frameworks. Together we’ll build an app called TweetBook that will allow you to use Twitter and Facebook within the same application.

8.1. Accessing accounts with the Accounts framework

8.2. Using the Social framework to post content

8.3. Making API requests with the Social framework

8.4. Summary