Beginning iOS Apps with Facebook and Twitter APIs for iPhone, iPad, and iPod touch By Chris Dannen | Christopher White
Download
Introduction
What the Social Graph
Can Do for Your App
Once upon a time, there were “social” networks that helped people connect with friends.
Nowadays, every application and web service can be considered social. Why? Simply
put, it’s because people like to share. Whether it’s publishing a high score in a video
game or posting a picture where friends can see it, iOS users have become accustomed
to showing their digital life to their network of friends, family, and colleagues.
That network of people is called the social graph. A person’s social graph describes
everyone he knows and how those people are connected. Since Facebook CEO Mark
Zuckerberg coined the term in 2007, the social graph has become more than just who
you know. Other “nodes” that have been added include places, events, brands, and
multimedia. All these things can act as vectors by which people connect to one another.
Facebook and Twitter exist to document the social graph of its users and push them to
make new connections. Both companies have powerful incentives to expand the social
graph of its users: knowing users’ connections and predilections allows them to sell
targeted advertisements, deliver recommendations, and initiate partnerships around ecommerce
and real-world commerce alike.
For app developers, the opportunities are much the same. Adding Facebook or Twitter
functionality to an iOS app can open up vast new opportunities for monetization and
new features, but there is plenty of other cool stuff in store, too. Connecting your app to
the social graph makes it easier for users to log in, manage their account, and transfer
information in and out. And both Facebook and Twitter have built extensive APIs and
frameworks that can spare developers from having to reinvent the wheel. (Facebook, for
example, has even made its custom iOS frameworks open source.)
Both services have audiences of hundreds of millions of users looking to explore. Now
that all those folks have invested time building out a Facebook profile or cranking out a
stream of tweets, many of them are curious how else they can use their accounts. Show
them!
What Is This Book for?
This book shows iOS developers how you can build Facebook and/or Twitter into your
apps, allowing you to build more secure, flexible, and usable apps. But there is a lot
more than just technical guidance here. The chapters of this book will also delve into
some of the philosophical questions that go into utilizing the social graph. For example,
it will address design and branding, so that users will recognize the Facebook and
Twitter features they love when they’re inside your app.
What You’ll Need
This book won’t endeavor to teach you how to build an entire iOS app from the ground
up, so you’ll want to have some semblance of an app already built by the time you pick
up the Facebook and Twitter APIs. And while we’ll be working in trusty ol’ Cocoa Touch
and Objective-C, there will also be plenty of Web stuff that requires JavaScript, HTML,
and CSS. Picking up the APIs we’ll discuss in this book will go more smoothly if you’ve
programmed for the Web before.
What You Should Know
The social graph is about people. It’s about their content, their friends, and their
businesses. Some of the interactions you’ll encounter are socially sophisticated—you’re
messing with peoples’ relationships here. The way these relationships function online
will be hard to understand if you’ve never spent much time using Facebook or Twitter. If
you’re thinking about adding one of these APIs to your app, you’ll find it worth taking the
time to get comfortable with the services. Do this, and you’ll gain a more nuanced
understanding of the privacy issues (there are many); the platforms (they’re not perfect);
and most importantly, an idea of what these things are actually useful for.
What You’ll Learn
By the time you’re finished with this book, you’ll know how to build an app that can
connect to the world’s most popular social Web services quickly, securely, and
discreetly. You’ll understand how to leverage the social graph to make your software
more useful, more fun, and more popular. You’ll also see where the weak spots in the
platform lie and understand better how the APIs will evolve in the future.
But perhaps most crucially, you’ll understand the beginnings of a significant moment in
the development of the Web and the iOS: the coalescence of online life and real life.
There is immense power being endowed in the Web now as people bring their real-life
relationships, experiences, interests, and emotions into the social graph. The more rack
space that Twitter and Facebook build, the more user data becomes available to your
app. And the better you know the user, the more useful your programs become.
Learning the Social Graph
If you haven’t seen the movie “The Social Network,” we’ll save you the trouble. “You
don't even know what the thing is yet,” Sean Parker says to Zuckerberg at the film’s
apogee. And he’s absolutely right: no one knows what Facebook is, or what it will
become.
Both Facebook and Twitter, as large and well-funded as they are, are probably still in
their incipience. A lot is going to change as business and society come to mold their
media, communication, and commerce around these platforms. If you can’t think of a
killer use-case for Facebook or Twitter in your app at this stage in the game, don’t
worry—you’re only on page three. It may take some thinking (and plenty of prototyping)
before you understand how to put the social graph to the best possible use in your app.
But that’s okay because everyone else is in the same boat.
To get your brain on its way to ginning up good ideas, we’ll cover some very basic
things you can do with Facebook and Twitter inside an app by manipulating their APIs.
Home Api Development Beginning iOS Apps with Facebook and Twitter APIs