O'Reilly logo

Android Cookbook by Ian F. Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 15. Social Networking

15.1. Introduction: Social Networking

Ian Darwin

Discussion

In the second decade of this century, nobody writing about the Internet would underestimate the importance of social networking. Dominated as it is by a few major sites—Facebook and Twitter being the biggest of the big—social networking provides both an opportunity for developers and a missed opportunity for the developer community as a whole. Certainly there are still opportunities for creative use of social networking. But what is missing (despite valiant efforts) is a single “open social networking” API that includes authorization, messaging, and media interchange.

This chapter provides a few how-tos on accessing Facebook and Twitter, using plain HTTP (they all originated as web-based sites just before the explosion of mobile apps) and using more comprehensive but more-specific APIs.

15.2. Integrating Social Networking Using HTTP

Shraddha Shravagi

Problem

You need a basic level of social networking support in your app.

Solution

Instead of diving into the API, you can simply add social networking support.

For Facebook, Twitter, and LinkedIn integration, just follow three simple steps to get started:

  1. Download the logos for Facebook, Twitter, and LinkedIn.

  2. Create image buttons for each of them.

  3. Implement an event handler that, when the user presses the button, passes control to the relevant site and displays the results in a browser window.

Discussion

Here is a simple approach to adding basic social networking. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required