New Design Platform Changes

From Facebook Developers Wiki

Jump to: navigation, search

Contents

[edit] Platform Changes

With the new design comes a series of new API calls and FBML tags. In addition, there are changes to existing Platform elements (including API calls, FBML tags, profile integration points, and session keys) of which you should take note.

[edit] Registering Templates: New API Methods

Since each News Feed-worthy story can potentially be rendered in one line, short, or full versions, Facebook encourages you to register all your templates ahead of time, using a new API method, feed.registerTemplateBundle. This method stores all the registered templates in whatever capacity Facebook finds suitable, and returns a unique integer identifier that the developer can use to publish actual stories using that template bundle. Other API methods can be used to extract information about any or all of an application’s registered template bundles.

  • feed.registerTemplateBundle: Builds a template bundle around the specified templates, registers them with Facebook servers, and responds with a template bundle identifier that can be used to identify your template bundle to other feed-related API calls.
  • feed.getRegisteredTemplateBundles: Retrieves the full list of all the template bundles registered by the requesting application.
  • feed.getRegisteredTemplateBundleByID: Retrieves information about a specified template bundle previously registered by the requesting application.
  • feed.publishUserAction: Publishes a story on behalf of the user owning the session, using the specified template bundle. Unlike the previous three API calls, this method requires an active session key in order to be called.

[edit] Application Info Sections: New API Methods and FBML Tag

Users can personalize the Info tab on their profiles by adding application info sections, which are structured sections of application information, like a list of best friends or favorite books.

  • profile.setInfo: Configures an application info section that the specified user can install on the Info tab of her profile.
  • profile.getInfo: Returns the specified user’s application info section for the calling application.
  • profile.setInfoOptions: Specifies the objects for a field for an application info section. These options populate the typeahead for a thumbnail.
  • profile.getInfoOptions: Returns the options associated with the specified field for an application info section.
  • fb:add-section-button: Renders an Add to Info button on an application’s canvas page, which allows a user to add a new application info section to the Info tab of the profile. Takes a section="info" parameter that sets the title of the section.

[edit] Integrating an Application into a User Profile

The integration points that currently appear on the application add page are being decentralized throughout the profile. Users can decide how to integrate the application into their profiles at those integration points as well as the new integration points (like tabs). The following table illustrates how will users interact with the integration points that are currently on the add page.

Integration Point New Behavior
Receiving email The new behavior has not been determined yet.
Adding a profile box A user's current application boxes will be migrated over to the new profile and appear either on the main profile left column on the “Boxes” tab, as previously described. Users can also add a profile box to the main profile by clicking an Add New Profile Section button which the application can insert into their canvas pages via the fb:add-section-button FBML tag.
Left side navigation link Users can directly bookmark applications they are using.
Profile action link There are no profile action links for third party applications. Instead, users interact with their friends using applications in the Publisher box.
Feed stories By default, applications can send Feed stories to Users. Users can choose to opt out of having applications send Feed stories.
Accessing user information The user grants an application access to his information when the user logs in and accepts the application's Terms of Service.

[edit] Changes to Existing Platform Components

Some Platform API methods and FBML tags are changing to accommodate the new design.

Call/Tag Change
profile.setFBML Now has a new parameter, a string called profile_main that contains the FBML for the application profile box on the main part of the user's profile.

Also, the profile_action parameter is being deprecated.

fb:profile-action With the new design, this tag is deprecated. There are no application profile action links.

[edit] Changes to Session Keys

The following API calls no longer require a session key, and should not reference a session key:

The following API calls no longer require a session key for Web applications, but if a session key is included, it must be valid and will use the current user. Desktop applications still require a session key for security reasons.

Navigation