Looking back on an example as simple as http://fettermansbooks.com, it becomes clear that most Internet applications would benefit from added social context for the data they present. However, we run into a product problem: the availability of that data.
product problem: Applications could make use of a user’s social data on Facebook, but this data is inaccessible.
data solution: Make Facebook data available through an externally accessible web service (Figure 6-2).
The addition of the Facebook API to Facebook’s architecture begins the relationship between external applications and Facebook through the Facebook Platform, essentially adding Facebook’s data to the external application’s stack. For a Facebook user, this integration begins when he explicitly authorizes the outside application to obtain social data on his behalf.
Figure 6-2. The application stack consumes Facebook data as web service
Example 6-4. Example book site logic
$books_user_id = establish_booksite_userid($_REQUEST); $book_infos = user_get_likely_books($books_user_id); display_books($book_infos);
user_get_likely_books function operates entirely from the data that the book application controls, possibly using clever relevance techniques to guess at a user’s ...