Wednesday, October 20, 2010

Twitter API Documentation

0 komentar
Twitter exposes its data via an Application Programming Interface (API). This document is the official reference for that functionality.

Getting Started

The concepts every developer should know before interacting with the API.

Streaming API

Stream public statuses in near real-time over a persistent connection. Sampled or filtered by track keyword or by userid.

REST Methods

In addition to the Streaming API, the Twitter API includes the following RESTful methods to send and receive Twitter data.

Search API Methods 


REST API Methods 

Timeline Methods

 

Status Methods

          statuses/retweet
          statuses/retweets
          statuses/id/retweeted_by
          statuses/id/retweeted_by/ids

 

User Methods


List Methods

         POST lists      (create)
         POST lists id  (update)
         GET lists        (index)
         GET list id      (show)
         DELETE list id (destroy)
         GET list statuses
         GET list memberships
         GET list subscriptions

 

List Members Methods

         GET list members
         POST list members
         DELETE list members
         GET list members id

List Subscribers Methods

         GET list subscribers
         POST list subscribers
         DELETE list subscribers
         GET list subscribers id

 

Direct Message Methods 

 

Friendship Methods

 

Social Graph Methods

 

Account Methods

 

Favorite Methods

 

Notification Methods

 

Block Methods


Spam Reporting Methods

          report_spam

Saved Searches Methods

OAuth Methods

Trends Methods
          trends/available
          trends/location


Geo methods
          geo/nearby_places
          geo/reverse_geocode
          geo/id

Help Methods

HTTP Response Codes and Errors

Applications send information throught the HTTP response codes and error messages.

Return Values

API methods return elements of data. These elements contain a known set of fields.

Terms of Service

The API is free, but here are the words to code by.

Tuesday, October 19, 2010

Application Programming Interface (API) - Part 2

0 komentar
API in object-oriented languages
In object oriented languages, an API usually includes a description of a set of class definitions, with a set of behaviours associated with those classes. A behaviour  is the set of rules for how an object, derived from that class, will act in a given circumstance. This abstract concept is associated with the real functionalities exposed, or made available, by the classes that are implemented in terms of class methods.

The API in this case can be conceived as the totality of all the methods publicly exposed by the classes (usually called the class interface). This means that the API prescribes the methods by which one interacts with/handles the objects derived from the class definitions.

More generally, one can see the API as the collection of all the kind of objects one can derive from the class definitions, and their associated possible behaviours. Again: the use is mediated by the public methods, but in this interpretation, the methods are seen as a technical detail of how the behaviour is implemented.

For instance: a class representing a Stack can simply expose publicly two methods push() (to add a new item to the stack), and pop() (to extract the last item, ideally placed on top of the stack).

In this case the API can be interpreted as the two methods pop() and push(), or, more generally, as the idea that one can use an item of type Stack that implements the behaviour of a stack: a pile exposing its top to add/remove elements.

This concept can be carried to the point where a class interface in an API has no methods at all, but only behaviours associated with it. For instance, the Java language API includes the interface Serializable, which requires that each class that implements it should behave in a serialized fashion. This does not require to have any public method, but rather requires that any class implements it to have a representation that can be saved (serialized) at any time (this is typically true for any class containing simple data and no link to external resources, like an open connection to a file, a remote system, or an external device).

In this sense, in object oriented languages, the API defines a set of behaviors, possibly mediated by a set of class methods.

In such languages, the API is still distributed as a library. For example, the Java language libraries include a set of APIs that are provided in the form of the JDK used by the developers to build new Java programs. The JDK includes the documentation of the API in JavaDoc notation.

The quality of the documentation associated to an API is often a factor determining its success in terms of ease of use.

API and protocols
An API can also be an implementation of a protocol. In general the difference between an API and a protocol is that the protocol defines a standard way to exchange requests and responses based on a common transport, while an API provides a library to be used directly.

Web APIs

When used in the context of web development, an API is typically a defined set of Hypertext Transfer Protocol (HTTP) request messages, along with a definition of the structure of response messages, which is usually in an Extensible Markup Language (XML) or JavaScript Object Notation (JSON) format. While "Web API" is virtually a synonym for web service, the recent trend (so-called Web 2.0) has been moving away from Simple Object Access Protocol (SOAP) based services towards more direct Representational State Transfer (REST) style communications.[3] Web APIs allow the combination of multiple services into new applications known as mashups


Use of APIs to share content

The practice of publishing APIs has allowed web communities to create an open architecture for sharing content and data between communities and applications. In this way, content that is created in one place can be dynamically posted and updated in multiple locations on the web.
  1. Photos can be shared from sites like Flickr and Photobucket to social network sites like Facebook and MySpace.
  2. Content can be embedded, e.g. embedding a presentation from SlideShare on a LinkedIn profile.
  3. Content can be dynamically posted. Sharing live comments made on Twitter with a Facebook account, for example, is enabled by their APIs.
  4. Video content can be embedded on sites which are served by another host.
  5. User information can be shared from web communities to outside applications, delivering new functionality to the web community that shares its user data via an open API. One of the best examples of this is the Facebook Application platform. Another is the Open Social platform.



Implementations

The POSIX  standard defines an API that allows a wide range of common computing functions to be written in a way such that they may operate on many different systems (Mac OS X, and various Berkeley Software Distributions (BSDs) implement this interface); however, making use of this requires re-compiling for each platform. A compatible API, on the other hand, allows compiled object code  to function without any changes to the system implementing that API. This is beneficial to both software providers (where they may distribute existing software on new systems without producing and distributing upgrades) and users (where they may install older software on their new systems without purchasing upgrades), although this generally requires that various software libraries implement the necessary APIs as well.

Microsoft has shown a strong commitment to a backward compatible API, particularly within their Windows API (Win32) library, such that older applications may run on newer versions of Windows using an executable-specific setting called "Compatibility Mode".

Apple Inc.  has shown less concern, breaking compatibility or implementing an API in a slower "emulation mode"; this allows greater freedom in development, at the cost of making older software obsolete.

Among Unix-like  operating systems, there are many related but incompatible operating systems running on a common hardware platform (particularly Intel 80386-compatible systems). There have been several attempts to standardize the API such that software vendors may distribute one binary application for all these systems; however, to date, none of these have met with much success. The Linux Standard Base is attempting to do this for the Linux platform, while many of the BSD Unixes, such as FreeBSD, NetBSD, and OpenBSD, implement various levels of API compatibility for both backward compatibility (allowing programs written for older versions to run on newer distributions of the system) and cross-platform compatibility (allowing execution of foreign code without recompiling).

Release policies

The two options for releasing API are:
  1. Protecting information on APIs from the general public. For example, Sony used to make its official PlayStation 2 API available only to licensed PlayStation developers. This enabled Sony to control who wrote PlayStation 2 games. This gives companies quality control privileges and can provide them with potential licensing revenue streams.
  2. Making APIs freely available. For example, Microsoft makes the Microsoft Windows API public, and Apple releases its APIs Carbon and Cocoa, so that software can be written for their platforms.
A mix of the two behaviors can be used as well.

ABIs

The related term application binary interface (ABI) is a lower level definition concerning details at the assembly language level. For example, the Linux Standard Base is an ABI, while POSIX is an API.

API examples


Language bindings and interface generators

APIs that are intended to be used by more than one high-level programming language  often provide, or are augmented with, facilities to automatically map the API to features (syntactic or semantic) that are more natural in those languages. This is known as language binding, and is itself an API. The aim is to encapsulate most of the required functionality of the API, leaving a "thin" layer appropriate to each language.

Below are listed some interface generator tools which bind languages to APIs at compile time.

  • SWIG opensource interfaces bindings generator from many languages to many languages (Typically Compiled->Scripted)
  • F2PY: Fortran to Python interface generator.

Monday, October 18, 2010

Application Programming Interface (API) - Part 1

0 komentar
An application programming interface (API) is an interface implemented by a software program  that enables it to interact with other software. It facilitates interaction between different software programs similar to the way the user interface facilitates interaction between humans and computers.
An API is implemented by applications, libraries, and operating systems to determine their vocabularies and calling conventions, and is used to access their services. It may include specifications for routines, data structures, object classes, and protocols used to communicate between the consumer and the implementer of the API.


Concept
An API is an abstraction that describes an interface for the interaction with a set of functions used by components of a software system. The software providing the functions described by an API is said to be an implementation of the API.

An API can be:

  • general, the full set of an API that is bundled in the libraries of a programming language, e.g. Standard Template Library in C++ or Java API.
  • specific, meant to address a specific problem, e.g. Bing Maps API or Java API for XML Web Services.
  • language-dependent, meaning it is only available by using the syntax and elements of a particular language, which makes the API more convenient to use.
  • language-independent, written so that it can be called from several programming languages. This is a desirable feature for a service-oriented API that is not bound to a specific process or system and may be provided as remote procedure calls or web services. For example, a website that allows users to review local restaurants is able to layer their reviews over maps taken from Bing Maps, because Bing Maps has an API that facilitates this functionality. Bing Maps' API controls what information a third-party site can use and how they can use it.
API may be used to refer to a complete interface, a single function, or even a set of APIs provided by an organization. Thus, the scope of meaning is usually determined by the context of usage.

Advanced explanation
An API may describe the ways in which a particular task is performed. For example, in Unix systems, the math.h include file for the C language  contains the definition of the mathematical functions available in the C language library for mathematical processing (usually called libm). This file would describe how to use these functions and the expected result. For example, on a Unix system the command man 3 sqrt will present the signature of the function sqrt in the form:








that means that the function returns the square root of a positive floating point number (single or double precision) as another floating point number. Hence the API in this case can be interpreted as the collection of the included files used by the C language and its human readable description provided by the man pages.

API in modern languages
Most of the modern programming languages provide the documentation associated to an API in some digital format that makes it easy to consult on a computer. E.g. perl comes with the tool perldoc:





python comes with the tool pydoc:







ruby comes with the tool ri:






Java comes with the documentation organized in html pages (JavaDoc format), while Microsoft distributes the API documentation for its languages (Visual C++, C#, Visual Basic, F#, etc...) embedded in Visual Studio help system.

Tuesday, September 28, 2010

Setting Up a New App

1 komentar
Problem
I’m rip-roarin’ to go on my new app and have the Developer app installed and mastered. Now what?
If you don’t have the Developer app installed, check out Recipe 3.1. You’ll also need to have hosting set up with a third-party hosting provider; if you don’t, check out Recipe 5.12 for more information. For the purposes of this recipe, we’re going to use http://yourdomain.com as the name of your third-party host.
Solution
Inside the Developer app (http://www.facebook.com/developers), you’ll find a Set Up New Application button

Figure 3-2. The fabled Set Up New Application button in its natural habitat

On the Developer app page, which lists all of your apps (http://www.facebook.com/developers/apps.php), you’ll find a button that looks similar but is labeled Apply for an Application Key (Figure 3-3).

Figure 3-3. Set Up New App’s evil twin, Apply for an Application Key
Click on either button to jump into the world’s most deceptive form, shown in Figure 3-4. Sure, you could just provide an Application Name, check the ToS box, and ignore the innocent-looking Optional Fields area, but you’d be in for a nasty surprise when your app doesn’t work.

Figure 3-4. Simple version of the Set Up New Application formFill in the form to add your new Hello World app and get an API key, and then you’re ready to start rocking. Take the extra few minutes to complete the full form here, even if you don’t know all the details now. See the Discussion, next, for a description of each field.

Discussion
Some of the fields in the form are a little complex the first time through, so here’s a quick guide.

Base Options
Developer Email Addresses (Contact and User Support)
Pretty self-explanatory, though worth noting that important things like ToS violation notices will get sent to the Developer Contact Email, so make sure you check it regularly. You should check the User Support address too, but it might be worth having them go to separate places so you can make sure you don’t miss anything important from Facebook. Suggested Hello World values: contact@yourdomain.com, support@yourdomain.com
If you don’t have a bug tracking system in place, take a look at something like FogBugz from Fog Creek Software. Not only is Joel Spolsky one of the industry’s leading brains on the development of quality software (see http://www.joelonsoftware.com), but FogBugz also has the ability to automatically check an email address and pull all the new messages in as support tickets. Their hosted Software-as-a-Service version is really inexpensive, and you can have it pull in all messages sent to the support address you specify here so you can easily track the issues your users are having. It also includes a wiki and discussion forum that you can open up to your users if you need to. More details are at http://www.fogbugz.com.
Callback URL
The address on your third-party server where Facebook will find the pages that actually make up your application. For more information, see http://wiki.developers .facebook.com/index.php/Your_callback_page_and_you.
Suggested Hello World value: http://www.yourdomain.com.
Canvas Page URL
Unless you have a really good reason for using an iFrame, you want to pick FBML here. You’ll have a lot more control over your app’s integration with Facebook and will have full access to things like FBML and FBJS when you’re writing your code. Plus, it’s what all the cool kids are doing. Think carefully about what you put in the URL here. It will be visible to everyone who uses the app, and it’s best not to move it around or you’ll break precious inbound links.
Suggested Hello World value: Unfortunately, you’re not going to get “helloworld,” so you might want to go with something like “jays-fantastic-demo.” (You can’t, of course, all use “jays-fantastic-demo”; only the first one of you to read this and nab it can.)
Profile Tab URL
Under the new Profile design launched in July 2008, applications can now give users the option to add a Profile tab that exclusively displays their content. If your app supports that functionality, you need to specify the URL here from which Facebook can get the FBML to display on the tab (note that it will always be a URL starting with http://apps.facebook.com/).
Suggested Hello World value: We’re not actually going to add support for a tab here, but if we were, the URL might be something like http://apps.facebook.com/ jays-fantastic-demo/profile-tab.php.
Profile Tab Name
If you’re providing a Profile tab URL, you need to also provide a name for your tab that will appear on the Profile tab itself. Facebook will use roughly the first 15 characters of the name on the tab.
Suggested Hello World value: Leave it blank, since we’re not using it.
Application Type
This will be “website” for almost all of you, unless you’re planning to build a desktop app that lives outside of Facebook and communicates with it via the API (e.g., photo uploaders, Outlook synchronization). Note that your selection here will change the other fields in the form.
Suggested Hello World value: website.
Mobile Integration
At the time this book was written, the mobile integration side of Facebook Platform hadn’t taken off nearly as strongly as the website side. Some very powerful tools are available to you as an app developer, and it’s always a good idea to consider ways to expand your user base, so think about adding in mobile support for your app. You can always check this option later if it’s not part of your version-one plans. For more information about Facebook Platform for mobile, see http://wiki .developers.facebook.com/index.php/Mobile.
Suggested Hello World value: Leave this unchecked for Hello World.
IP Addresses
This is an optional security measure that can help prevent fraud in your app. If you’re building something like a contest site and you want to make sure that the only servers that can communicate with Facebook belong to you, add in their IP addresses and Facebook’s mighty firewall will block everyone else. This is probably overkill for most apps and can be a pain if you move servers and forget to update this, so I wouldn’t recommend it unless you need it.
Suggested Hello World value: You can leave it empty for Hello World, but you should put the IP address of your http://yourdomain.com server in here for other apps.
IP Blocking Exceptions
If you’re using the IP Addresses server to constrain your app to only accept requests from your server but you also have a client-side component making API requests, you’ll need to set “Allow IP Blocking Exceptions” to “Yes” and make sure that those components use session secret keys for security.
Suggested Hello World value: “No” for Hello World, but “Yes” if the previous paragraph describes your need for other apps.
Can your application be added on Facebook?
This might be the most confusing field on the form. If your app can’t be added on Facebook, why are you building it? The simple answer is that it might be a webbased tool outside of Facebook, or a desktop app that can’t be added to a Profile. You’ll almost definitely want to turn this on. Two whole new areas of the form will appear once you check this field. These areas allow you to adjust access privileges (make sure to lock your app down to just developers until you’re ready to launch; see the Developers option, discussed later) and configure Platform integration points.
Suggested Hello World value: Yes.
TOS URL
You can use a Canvas page URL here so that users don’t have to leave Facebook, or you can point them to an external URL if your legal department has carefully crafted a masterful ToS and wants everyone to read it on your website. If you don’t have a ToS, you can leave this blank, but keep in mind that you’re opening yourself up to potential legal troubles. It’s not that hard to come up with a reasonable ToS for your app: go read a bunch of other ToSes and cobble together a new Frankensteinian version from the parts you like best. This will appear as a link when users
are adding your application.
Suggested Hello World value: We’re not going to add a ToS to the Hello World app, so you can leave it blank. Otherwise, a URL such as http://apps.facebook.com/jays-fantastic-demo/tos.php would work.
Developers
You’ll have the option to have your app listed as having been built by everyone in this field or by a company when you edit the About Page information. Everyone you list in this field can access the application’s settings (this page and the various additional pages), as well as the Insights stats on app usage. If you have the app locked down in Developer Mode, they’re also the only people who will be able to add or use the app. Note that you need to be friends with anyone you want to add, so you’ll need to do a friend request first. As with all the other fields on this form,
you can change this later, so don’t worry about listing everyone now.
Suggested Hello World value: You can just list your own name for the Hello World app.
Default iFrame Canvas Size
If you’re not building an iFrame-based app, you can ignore this one. For those of you who have a really good reason to do so, this setting toggles your iFrame from being “smartsized” (Facebook automatically sizes it to fill the available space on the page) to being resizable (you have control via the JavaScript API). Remember: with control comes responsibility, which means you’ll need to size it yourself and won’t be able to rely on Facebook to handle it for you. This is one of the great trade-offs in life, second only to the eternal struggle over whether the toilet paper should roll off the front or back side (always bet on back).
Suggested Hello World value: We’re not going to use an iFrame for Hello World, so you can leave it as smartsize.
Internationalization Options
Language Selection
As of late July 2008, developers can now take advantage of Facebook’s Translations application to have their application translated into different languages. This option, which defaults to English, allows you to specify the default language.
Suggested Hello World value: Since you’re reading this in English, that’s probably a safe choice.
Installation Options
This section will be available to you only if your app is set in the Base Options as being able to be added to Facebook (see the earlier section for details).

Who can add your app?
Of all the dastardly user interface designs you’re likely to encounter as a Facebook developer, this question has got to rank near the top. It’s such a strange mix of controls that it deserves its own screenshot for posterity (Figure 3-5).
Where to even start? Perhaps with the lonely checkbox labeled Users. The difficultto- understand distinction here is that you’re enabling Users and/or Pages, which would be much more obvious if there were a checkbox for Pages with the three
Page-related options grouped underneath it. And speaking of those three blind
mice: the All and None choices are pretty self-explanatory, but what to make of
Some? Clicking on it will open a massive list of checkboxes that let you tailor the
types of Pages (e.g., some combination of the 69 available Page types, which includes
Actor and Model but lacks the all important Actor/Model combo).
Generally speaking, you want to turn on the Users checkbox so that individual users can add your app. You should think about what it means for your app to be available on Pages and should definitely go for it if you can, but make sure that you consider all the angles. If you’re building the most awesome Go Fish game ever made, what would it mean for a Rental Cars or Religious Organization Page to have a Profile Box for it?
Suggested Hello World value: Pages are going to have to live without your Hello World app because we’re making it available only to Users.
Figure 3-5. The bizarre mélange of controls that is the “Who can add your app” field

Post-Add URL
This one is simple: where do you want users to be sent once they’ve added your app to a Facebook Page? You’re generally going to put a Canvas page URL in here, which will usually be the app’s home page, but it might be a special welcome page or include a parameter in the URL to let your app know to display a welcome message. Consider having this point to an Invite Friends page that you show only to new users, which asks them to invite their friends into the app before they start using it (though this move is losing popularity as users feel more and more like they’re being pressured to buy a used car from a guy in a bad suit, so you might
want to skip it). For more information, see http://wiki.developers.facebook.com/index.php/Post-Add_URL.
Suggested Hello World value: We’re not supporting Pages in this example, so you can leave this blank (or just use the value you put into Post-Authorize URL, described next).
Post-Authorize URL
This is similar to the Post-Add URL, but it’s for users authorizing your app to access their Profile for the first time rather than for users adding it to a Facebook Page.
Suggested Hello World value: Since Hello World is really just for you and we’re not worrying about inviting friends, we’re going to keep this simple and use http://apps.facebook.com/jays-fantastic-demo/.
Application Description
If you’re the kind of developer who has meticulously planned out every nook and cranny of your work of art well in advance, go ahead and fill in this box with your carefully crafted, 250-character marketing masterpiece. For everyone else, leave this field blank and come back to it after you’ve built the app and are ready to add it to the Application Directory.
Suggested Hello World value: Follow my advice and leave it blank for now.
Post-Remove URL
As George Santayana once said, “Those who cannot remember the past are condemned to repeat it.” Wouldn’t it be great if you could be notified whenever someone removes your app from a Facebook Page, so that you could track the circumstances and learn something from them? Well, you can! Enter a URL here and Facebook will ping it whenever your app gets un-added, and will provide some useful info, such as the person’s UID and a timestamp. You’ll find a whole lot more information, including some sample PHP, Rails, and pseudocode for handling the pings, at http://wiki.developers.facebook.com/index.php/Post-Remove_URL. An
important note: this is different from the Post-Add URL because users won’t be directed to it after they remove the app. Facebook will send a background ping to the URL, and users will continue on their merry ways.
Suggested Hello World value: Again, we’re not supporting Pages and we don’t really care who uninstalls Hello World, so leave this blank.
Post-Authorize URL
This is similar to the Post-Remove URL, but it’s for users revoking authorization for your app to access their Profile rather than for users removing it from a Facebook Page.
Suggested Hello World value: Ditto here; we don’t really care who uninstalls Hello World, so leave this blank.
Default FBML and Action FBML
The Profile Box and Profile Action links are two of the Platform integration points you’ll be all over. Since the user has just added your app, you won’t have anything to insert yet, so the two default boxes let you specify the FBML that should be used until you first make a call to Profile.setFBML( ) (see Recipe 9.47). Leaving these blank will effectively make your app invisible on the user’s Profile page until then, so think about sticking a “coming soon” message in there in the meantime. Your ultimate Bowling Score app might, for example, pop in a box containing “Scores coming soon!” and a link into your app for all of the user’s bowling fanatic friends to follow.
Suggested Hello World value:
Hello big, wide world!Hello narrower world!
Default Profile Box Column
Users will have the option of dragging your Profile Box into either the wide or narrow column of the Boxes tab in their Profiles after it appears, and this gives you control over where it starts off. You can do completely different layouts depending on which width they choose, so pick the one you think is strongest as the default, but have a kick-ass backup in case they prefer the other size.
Suggested Hello World value: It doesn’t make much difference, but since most apps go with wide, you might as well go narrow and appear higher up the page by default.
Developer Mode
The all-important Developer Mode switch lets you limit access to and the adding of your app to the people you’ve listed as Developers. Everyone else will get a 404 Page Not Found error when they try to hit any of the app’s URLs, even if they had previously added the app.
Suggested Hello World value: On. This app isn’t going to do much, so it’s not really worth sharing with the wider world. If you’d like to show it to your friends, just add them as developers.
Integration Points
Like the Installation Options, this section will be available only if you set your app to
be addable to Facebook Profiles.

Side Nav URL
This option used to provide the URL you wanted users taken to when they clicked on your app in their Side Nav (the sidebar on the left edge of the Profile, which doesn’t exist anymore). Although this hasn’t been renamed yet, it’s now the URL you want users taken to when they select your app in the Applications menu in the blue header bar at the top of the Facebook window. Note that this has to be a Facebook Canvas page and can’t be an external URL.
Suggested Hello World value: http://apps.facebook.com/jays-fantastic-demo/
Privacy and Help URLs
Both of these are links to static content within your app and can point to Canvas pages within Facebook or to external pages elsewhere (though the former is better than the latter).
Suggested Hello World value: We don’t much care about private hellos or helping people, so leave ’em blank.
Private Installation
If you’re building one of those rare apps that won’t leverage the social graph to spread among users, you can turn on this option to disable News and Mini-Feed installation stories. This could be handy if your app is in a field such as health or finances, but you’re generally going to want to leave this option off.
Suggested Hello World value: Leave it off.
Attachments
Attachments are one of the most underused integration points, so you should think about how to take advantage of the scarcity of attachment options to give your app some good visibility in front of your users. You’ll need two pieces of information in order to enable Attachments for your app: the wording to use as the action (which will appear next to your app’s icon) and a callback URL (which will be loaded in the pop-up window to present the Attachment selection interface). For more information, see http://wiki.developers.facebook.com/index.php/Attachment_Example.
Suggested Hello World value: Leave this blank, since we’re not going to build attachments.
Publish Content to Friends/Self
The Publisher, introduced in the Profile redesign of mid-2008, provides users with a very simple mechanism for publishing content on the Wall tab on their own Profile or their friends’ Profiles. Specify URLs here for the Publishing Action and Callback Action the same way you do with Attachments, discussed earlier.
Suggested Hello World value: Leave this blank, since we’re not going to add Publisher support.
Info
The Info tab, which was also introduced in the Profile redesign, contains information about the user whose Profile you’re browsing. Apps can now populate their info into that tab, either in text-based or object-based formats, and will receive a ping at this URL when users edit the content so they can post-process it (i.e., tokenize and add URLs).
Suggested Hello World value: Leave this blank, since we’re not using the Info features.

Installing the Facebook Developer App

1 komentar
Problem
How do I actually add an app to Facebook? How do I configure and manage my apps?
Where are the stats?

Solution
It’s all about Facebook’s Developer app, which acts as a control panel for managing all of your apps, a portal into the Developer Discussion Board, a listing of News published by Facebook, and a Marketplace listing that shows Platform-related jobs available and
developers looking for gigs. It’s also where you’ll add a new app to Facebook, so install
it here: http://www.facebook.com/developers/.

Discussion
You’re going to spend a lot of time in this app, so it’s worth taking a quick look around.

Let’s take a quick tour of the major areas you’ll be interacting with :

Setup New Application
Starting in the top-right corner, you’ll see the all-important “Set Up New Application” button. That’s the key first step in adding a new app to Facebook, which we’ll cover a little later in this chapter.
My Applications
Immediately below that button, you’ll find a listing of all the applications that you’ve added, including the number of daily active users and fans of the app’s About Page.
Developer Status Feed
If you’re suddenly running into a problem that you didn’t have before, or you want a quick hit of what’s going on right now, check the Developer Status Feed list right under your applications. The Developers page pulls in the three most recent posts, but you can click through to the full list or subscribe to the RSS to stay absolutely up-to-date.
Discussion Board
To the left of your application list is the Discussion Board, which pulls in the five most recent posts from the Facebook Developer Forums (see http://forum.develop ers.facebook.com). A lot of very knowledgeable developers are on the boards who are happy to answer questions, so try posting questions here if you get stuck.
News
The rate at which Facebook makes changes to Platform is one of the biggest challenges in producing a book like this. Hitting a target that moves this quickly is like trying to bullseye womp rats from a T-16, if you know what I mean. Keep up-todate with the latest schemes hatched by the Facebook team in the News section, located just below the Discussion Board. Since their announcements regularly have a significant impact on what your application can do, I recommend subscribing to the RSS feed and making it a daily read.
Marketplace
If you’re the kind of evil genius who has brilliant ideas but lacks the technical chops to build them, or the kind of brilliant developer who needs an evil genius, then cast your eyes toward the Marketplace, located below the News. Use it to post about your idea and recruit developers, or post about your mad skillz and find projects to work on.
If you’re anything like me and your RSS reader is subscribed to more feeds than a pig farm at lunchtime, you might want to use an RSS-toemail service to make sure you are alerted when Facebook posts updates that could affect your app. Check out http://www.rssfwd.com/ or http:// www.sendmerss.com/, both of which will happily send the latest posts from any RSS feed right into your inbox.