You are on page 1of 4

Facebook Interoperability

An Analysis

1. Introduction

Facebook is social-networking website, founded in 2004, that presently boasts over 34 million
users worldwide [1]. Users are embodied by a profile page that provides a synopsis of them, and
includes biographical and personal information describing their background and interests.
Although these features form part of most social utility websites, Facebook extends the concept
by introducing networks to which members can join and become part of. These online groupings
form dynamic, user-defined and controlled environments that encourage interaction between
members in novel and innovative ways. Other interesting features, such as friends, pokes, and
gifts, have secured Facebook’s success as a novel means of digitized social interaction. More
recently, the introduction of the development API has provided a platform from which members
are able to generate custom components that can form part of the Facebook application. These
additions have added a new dynamic to the website, and have simultaneously brought annoyance
and elation from its users. The vast array of available applications, however, signals that the
facilities provided by Facebook to aide in their development are in the very least useable, and
potentially even helpful in creating interoperable services.

2. Criteria for Interoperability

Simplicity

The usefulness of an API is often a function of its simplicity. While it may at first seem
favorable to provide mechanisms to access all aspects of a particular platform, this exceeding
measure of consideration frequently renders these API’s as problematic and difficult to use. At
present, the Facebook API consists of 29 methods, and represents a basic interface to the
internals of Facebook [2]. These methods act on several distinct entities, such as fbml, friends,
notifications, and photos, and represent mostly get and set actions that retrieve or modify
particular elements. Although the size of the API may seem comparably small to other Internet-
based API’s, it is able to provide a coverage that makes a large amount of useful information
available to the developer. While the API does not provide access to certain content, it is
sufficiently intricate to allow for developers to create complex applications for use within
Facebook.

Data Formats

The eXtensible Markup Language (XML) is a simple, flexible text markup language that is
proving to be an increasingly important tool to facilitate the transportation (serialization) and
storage of a varied range of data types [3]. These qualities have ensured its widespread adoption
as a means to represent dynamic, structured data, and as such, is the format of choice for replies
to Facebook API calls. Additionally, several other features of the standard indicate that its
popularity is not the sole motivation surrounding its use. XML documents are able to be encoded
using modern, efficient encoding formats, such as UTF-8 (see section 2.3). The unadorned tag
structures that characterize XML documents can be easily parsed and interpreted by a variety of
tools which are often freely available, or form part of existing programming languages.

While XML serves its purpose as a means to store and transmit structured data, other tools exists
which attempt to accomplish much the same. JavaScript Object Notation (JSON) is a lightweight
data interchange format for representing objects and other data structures [4]. While it is often
compared to XML, JSON is not a markup language, and instead serves the primary purpose of
data interchange [4]. Even though these differences exist, both formats can be used to
encapsulate the response generated by Facebook after an API call. The developer of the
particular API specifies the preferential response format as being either XML or JSON, and
Facebook returns its responses in the specified format. As such, by providing a means to receive
responses in different formats, interoperability between supportive technologies is improved,
without impacting on the simplicity of the API itself.

Data Encoding

Encoding offers a mechanism to create direct mappings between dissimilar entities. In


computing, data encoding pairs a sequence of characters from a particular character set with a
numerical or alphanumerical representation that is better suited to computational storage and
transmission [5]. Several encoding standards have evolved in recent decades in an attempt to
represent a wider range of data in more efficient ways, and vary greatly according to efficiency
and scalability.

All communication with the Facebook API assumes character encoding using the Unicode
Transformation Format 8 (UTF-8) standard [6]. This encoding mechanism has several
advantages associated with it that makes its adoption a sensible choice when developing an
interoperable API. Most notably, all XML processors are explicitly required to process
documents that are encoded in UTF-8 or UTF-16, regardless of whether an associated XML
declaration exists or not [7]. As such, these are the standard encoding mechanisms for XML
documents.
Once a request has been submitted to Facebook by means of a GET or POST request, a response
is sent in XML using UTF-8 encoding, ensuring that it can be deciphered by all XML processors
that adhere to the XML specification [8]. As such, the ideals of interoperability are reinforced by
ensuring that all responses from Facebook can be interpreted by all XML processors.
Additionally, UTF-8 encoding offers further advantages besides being the encoding of choice for
XML processing. Its ability to efficiently represent a vast array of characters suggests its
relevance to an application that attracts attention from across the globe. Older character sets,
such as ASCII, are unable to symbolize rare or unusual items such as Asian alphabets or
mathematical notations. The addition of custom applications to Facebook has further increased
the significance of these encoding formats. User defined content is often varied and
unpredictable, especially when generated by vernacularly dissimilar users and developers. UTF-
8, therefore, allows for interoperability between Facebook and character sets used by the users
and developers of these custom applications.
API as a Specification

A Standard is a formal description that is endorsed, validated and maintained by a standards


body [9]. They are generally regarded as a tangible means of expressing proposals regarding
certain implementations of software, and embody a unified attempt to merge ideas in an attempt
to provide a focused and descriptive solution. Facebook, however, provide a specification which
details the mechanisms that they provide in order to access content on their systems. This differs
from a specification in that it represents a one-sided, singular interpretation of the problem.
Although this is considered as standard practice for proprietary organizations, it creates
implementations that are possibly opinionated, and thereby detract from its interoperable
qualities. Although the API provided by Facebook may be useful in many senses, a
collaboratively developed standard might prove more useful, especially considering its
international appeal.

Transport

Explicit communication and data exchanges have to occur between the custom applications and
the Facebook API server in order for any methods to be called. Representational State Transfer
(REST) is a protocol that, in the most simplest of terms, describes any simple interface that uses
XML or comparative technologies over HTTP without requiring the support of additional
message layers, such as SOAP [10]. The Facebook API exchanges information over HTTP using
a REST-based protocol, implying that applications submit text within a POST request to the
Facebook API server [6]. The server then answers with an appropriate XML response. This
simplistic yet effective approach to communication ensures that all parties aught to be able to
send and receive data, without having to install possibly unfamiliar protocols such as SOAP.
Although Facebook plans to include support for SOAP in later API releases [6], support for
REST will remain because of interoperability that it guarantees.

3. Conclusion

While the API that Facebook provides is described by means of a specification and not a
standard, it nevertheless appears to facilitate a certain degree of interoperability between
Facebook and the custom applications that are written for its consumption. Although the API
doesn’t give access to every desirable function, it is broad enough to allow developers to gain
critical information from the Facebook servers so that useful applications can be developed and
maintained. Additionally, the protocols that facilitate communications and the encodings and
encapsulation mechanisms all aide in creating an interface that is widely accessible and
interoperable. Although future additions to the API are likely to include the use of more
specialized technologies, a base level of interoperability is likely to remain that forms a
foundation onto which more intricate services can be built.
4. References

[1] Wikipedia. Facebook.


Available Online: http://en.wikipedia.org/wiki/Facebook
Last Accessed : 2007-08-19

[2] Facebook. API


Available Online: http://wiki.developers.facebook.com/index.php/API
Last Accessed : 2007-08-19

[3] Author Unknown. Extensible Markup Language


Available Online: http://www.w3.org/XML/
Last Accessed : 2007-08-20
[4] Wikipedia. JSON
Available Online: http://en.wikipedia.org/wiki/Json
Last Accessed : 2007-08-19

[5] Wikipedia. Character Encoding.


Available online: http://en.wikipedia.org/wiki/Character_encoding
Last Accessed : 2007-08-19

[6] Facebook. Facebook Developers FAQ.


Available Online: http://developers.facebook.com/faq.php
Last Accessed : 2007-08-20

[7] Skonnard, A. Gudgin, M. Essential XML Quick Reference. Addison-Wesley. p12

[8] Bray, T. Paoli, J. Sperberg-McQueen, C. Maler, E. Yergeau, F.


Extensible Markup Language (XML) 1.0 (Fourth Edition)
Available Online: http://www.w3.org/TR/REC-xml/
Last Accessed : 2007-08-20

[9] Suleman, H. Internet Interoperability Lecture Notes. Department of Computer Science.


The University of Cape Town. 2007.

[10] Author Unknown. What is Rest?


Available Online: http://rest.blueoxen.net/cgi-bin/wiki.pl?WhatIsREST
Last Accessed : 2007-08-20

You might also like