Facebook Developers
DocumentationSupportBlogAppsLog In
  • Getting Started
  • Core Concepts
  • Advanced Topics
    • Dialogs
    • FQL
    • Internationalization
    • Ads API
    • Credits
    • Chat API
    • Legacy REST API
    • Legacy FBML
    • Legacy FBJS
    • Legacy Javascript SDK
  • SDK Reference
  • Tools
  • Tools
    • fb:board
    • fb:bookmark
    • fb:chat-invite
    • fb:comments
    • fb:default
    • fb:else
    • fb:feed
    • fb:friend-selector
    • fb:google-analytics
    • fb:if
    • fb:if-multiple-actors
    • fb:multi-friend-input
    • fb:quantcast
    • fb:random
    • fb:random-option
    • fb:switch
    • fb:typeahead-input
    • fb:typeahead-option
    • fb:user-agent
  • User/Groups
    • fb:eventlink
    • fb:grouplink
    • fb:if-can-see
    • fb:if-can-see-photo
    • fb:if-is-app-user
    • fb:if-is-friends-with-viewer
    • fb:if-is-group-member
    • fb:if-is-user
    • fb:if-is-verified
    • fb:name
    • fb:profile-pic
    • fb:pronoun
    • fb:user
    • fb:user-status
  • Notifications and Requests
    • fb:application-name
    • fb:multi-friend-selector
    • fb:multi-friend-selector_(condensed)
    • fb:req-choice
    • fb:request-form
    • fb:request-form-submit
  • Platform Internationalization
    • fb:date
    • fb:fbml-attribute
    • fb:intl
    • fb:intl-token
    • fb:tag
    • fb:tag-attribute
    • fb:tag-body
    • fb:window-title
  • Deprecated
    • fb:if-is-own-profile
    • fb:if-user-has-added-app
    • fb:networklink
    • fb:notif-email
    • fb:notif-page
    • fb:notif-subject
    • fb:profile-action
    • fb:rock-the-vote
    • fb:userlink
    • fb:visible-to-added-app-users
    • fb:visible-to-user
  • Status Messages
    • fb:error
    • fb:explanation
    • fb:message
    • fb:success
  • Page Navigation
    • fb:create-button
    • fb:dashboard
    • fb:header
    • fb:header-title
    • fb:help
    • fb:mediaheader
    • fb:owner-action
    • fb:tab-item
    • fb:tabs
  • Wall
    • fb:wall
    • fb:wallpost
    • fb:wallpost-action
  • Visibility on Profile
    • fb:18-plus
    • fb:21-plus
    • fb:restricted-to
    • fb:visible-to-app-users
    • fb:visible-to-connection
    • fb:visible-to-friends
    • fb:visible-to-owner
  • Profile-specific
    • fb:action
    • fb:add-section-button
    • fb:if-section-not-added
    • fb:narrow
    • fb:publisher-link
    • fb:subtitle
    • fb:user-item
    • fb:user-table
    • fb:wide
  • Misc
    • fb:add-profile-tab
    • fb:fbml
    • fb:fbmlversion
    • fb:js-string
    • fb:page-admin-edit-header
    • fb:redirect
    • fb:ref
    • fb:serverFbml
    • fb:time
    • fb:title
  • Editor Display
    • fb:editor
    • fb:editor-button
    • fb:editor-buttonset
    • fb:editor-cancel
    • fb:editor-custom
    • fb:editor-date
    • fb:editor-divider
    • fb:editor-month
    • fb:editor-text
    • fb:editor-textarea
    • fb:editor-time
  • Embedded Media
    • fb:flv
    • fb:iframe
    • fb:mp3
    • fb:photo
    • fb:silverlight
    • fb:swf
  • Dialog
    • fb:dialog
    • fb:dialog-button
    • fb:dialog-content
    • fb:dialog-title
  • Additional Permissions
    • fb:prompt-permission
  • Social Plugins
    • fb:comments
    • fb:live-stream
  • Message Attachments
    • fb:attachment-preview
  • Forms
    • fb:captcha
    • fb:submit
  • Reference
    • JavaScript SDK

Facebook Markup Language (FBML)

Advanced Topics › Facebook Markup Language (FBML)
FBML has been deprecated. Starting June 1, 2012 FBML apps will no longer work as all FBML endpoints will be removed. If you are building a new application on Facebook.com, please implement your application using HTML, JavaScript and CSS. You can use our JavaScript SDK and Social Plugins to embedded many of the same social features available in FBML.

FBML enables you to build Facebook applications that deeply integrate into a user's Facebook experience. To use JavaScript within FBML, use FBJS.

  • Tools
  • User/Groups
  • Notifications and Requests
  • Platform Internationalization
  • Deprecated
  • Status Messages
  • Page Navigation
  • Wall
  • Visibility on Profile
  • Profile-specific
  • Misc
  • Editor Display
  • Embedded Media
  • Dialog
  • Additional Permissions
  • Social Plugins
  • Message Attachments
  • Forms
  • Reference

Tools

fb:board

Displays a discussion board with a unique identifier.

fb:bookmark

Renders a button that lets a user bookmark your application so a link to your application appears on the user's profile.

fb:chat-invite

Enables your users to initiate Facebook Chat with their friends from within your applications.

fb:comments

Displays a set of comments for a unique identifier.

fb:default

For a group of fb: tags contained within an fb:switch tag, the fb:default tag renders any content inside itself if no other fb: tag inside the fb:switch tag renders code before it.

fb:else

Handles the else case inside any fb:if, fb:if-* or fb:is-in-network tag, and with age and location restricting tags.

fb:feed

Renders an application-specific News Feed, which displays recent application stories about the logged in user's friends.

fb:friend-selector

Renders a predictive friend selector input for a given person.

fb:google-analytics

Inserts appropriate Google Analytics code into a canvas page.

fb:if

Only renders the content inside the tag if value tag is set to true.

fb:if-multiple-actors

Displays the enclosed content when more than one actor is involved in a Feed story.

fb:multi-friend-input

Renders a multi-friend form entry field like the one used in the message composer.

fb:quantcast

Inserts appropriate Quantcast code into a canvas page.

fb:random

Randomly chooses an item inside the tags based on the weights provided.

fb:random-option

Contains code to be output when selected by the fb:random tag.

fb:switch

Evaluates every fb: tag inside and returns the first one that evaluates to anything other than an empty string.

fb:typeahead-input

Creates a type-ahead tool (as suggested) that will give you the results that you specify.

fb:typeahead-option

This tag specifies the values for a typeahead form input.

fb:user-agent

Displays the contents wrapped inside the tag to the specified user-agents.


User/Groups

fb:eventlink

Prints the specified event name and formats it as a link to the event's page.

fb:grouplink

Prints the specified group name and formats it as a link to the group's page.

fb:if-can-see

Displays the enclosed content if the logged in user can see the specified what attribute of the specified user.

fb:if-can-see-photo

Displays the enclosed content only if the logged in user can see the photo specified.

fb:if-is-app-user

Displays the enclosed content only if the specified user has accepted the terms of service of the application (that is, authorized your application).

fb:if-is-friends-with-viewer

Displays the enclosed content only if the specified user is friends with the logged in user.

fb:if-is-group-member

Displays the enclosed content only if the specified user is a member of the specified group.

fb:if-is-user

Only renders the content inside the tag if the viewer is one of the specified user(s).

fb:if-is-verified

Displays the enclosed content only if Facebook has verified the current user.

fb:name

Renders the name of the user specified, optionally linked to his or her profile.

fb:profile-pic

Turns into an img tag for the specified user's or Facebook Page's profile picture.

fb:pronoun

Renders a pronoun for a specific user.

fb:user

Hides the content enclosed in this tag from any user who is blocked by the user whose uid is referenced in fb:user.

fb:user-status

Returns the status of the user specified by uid.


Notifications and Requests

fb:application-name

Renders the application name.

fb:multi-friend-selector

There are actually two versions of this button - the full version and the condensed version.

fb:multi-friend-selector_(condensed)

There are actually two versions of this button - the full version and the condensed version.

fb:req-choice

Specifies a button to be shown at the bottom of a request on the user's requests page.

fb:request-form

Creates a form that sends requests to the selected users.

fb:request-form-submit

Creates a button that submits an fb:request-form.


Platform Internationalization

fb:date

Renders a date.

fb:fbml-attribute

Contains the value of an attribute of an FBML tag.

fb:intl

Marks a string of English text as translatable into other languages.

fb:intl-token

Contains an attribute that replaces a token (variable) in the text of an fb:intl tag.

fb:tag

Renders an HTML tag.

fb:tag-attribute

Contains the value of an attribute of an HTML tag specified by fb:tag.

fb:tag-body

Contains the body (contents) of an HTML tag specified by fb:tag.

fb:window-title

Sets the title of the browser window to the content within the tag.


Deprecated

fb:if-is-own-profile

This tag is deprecated, since if- tags are no longer allowed on profile pages.

fb:if-user-has-added-app

Displays the enclosed content only if the specified user has added the application to their account.

fb:networklink

Prints the specified network name.

fb:notif-email

Specifies content of the email body for a notification sent with the notifications.send call.

fb:notif-page

Specifies content of a notification that appears on a user's Notifications page.

fb:notif-subject

Specifies the content of the email subject line for a notification sent with the notifications.send call.

fb:profile-action

Renders a link on the user's profile under their photo (such as "View More photos of..").

fb:rock-the-vote

Displays a Rock the Vote & CREDO Mobile registration widget inline in your application.

fb:userlink

Prints the specified user's full name linked to their profile along with their network, optionally (as is normally displayed on the Wall, for example).

fb:visible-to-added-app-users

Displays the enclosed content only if the viewer has added the application to their account.

fb:visible-to-user

Only displays the content inside the tag if the viewer is the specified user.


Status Messages

fb:error

Renders a standard Facebook error message.

fb:explanation

Renders a standard Facebook explanation message.

fb:message

Renders the heading text for an error, explanation or success message.

fb:success

Renders a standard Facebook success message.


Page Navigation

fb:create-button

Renders a Create button for adding user-generated content.

fb:dashboard

Renders a standard Facebook dashboard header.

fb:header

Renders a standard Facebook title header.

fb:header-title

Specifies the header title for a fb:mediaheader.

fb:help

Renders a help link.

fb:mediaheader

Renders a standard media header, intended mainly for displaying content contributed by a particular user.

fb:owner-action

Specifies an action link to be displayed inside a fb:mediaheader when the viewer is the owner of the content

fb:tab-item

Renders a standard Facebook tab.

fb:tabs

Renders a group of standard Facebook navigation tabs.


Wall

fb:wall

Emulates the look of a wall environment.

fb:wallpost

Renders a Wall-style post.

fb:wallpost-action

Displays a link at the bottom of a wallpost (even if it appears before other text within the fb:wallpost tag).


Visibility on Profile

fb:18-plus

Restricts content to users who are age 18 or older.

fb:21-plus

Restricts content to users who are age 21 or older.

fb:restricted-to

Lets you tailor the enclosed content to display to specific ages, locations, or content types.

fb:visible-to-app-users

Displays the enclosed content only if the viewer has granted full permissions to the application.

fb:visible-to-connection

Use this tag to display the content inside the tag on a user's or a Facebook Page's profile only if the viewer is a friend of that user or is a fan of that Facebook Page.

fb:visible-to-friends

Use this tag to display the content inside the tag on a user's profile only if the viewer is a friend of that user.

fb:visible-to-owner

Displays content inside only if the viewer of the profile matches the profile owner.


Profile-specific

fb:action

Renders a link, usually for navigational purposes.

fb:add-section-button

Renders an Add to Profile or Add to Info button (depending upon which section attribute you specify) on an application's canvas page.

fb:if-section-not-added

Renders the content wrapped within this tag on an application canvas page if the user hasn't added a condensed profile box or info section to her profile.

fb:narrow

Renders the content contained by the tag only if the profile box is in the narrow column of the profile.

fb:publisher-link

Renders an anchor tag around the internal content pointing to a profile with the application's Publisher preselected.

fb:subtitle

Defines the subtitle for the profile box.

fb:user-item

Renders a single cell of a table, which contains a thumbnail and name for a particular user, similar to the Mutual Friends table on profile pages.

fb:user-table

Renders a table, each cell of which contains a thumbnail and name for a particular user, similar to the Mutual Friends table on profile pages.

fb:wide

The enclosed content appears only when profile box is in the wide column of the profile.


Misc

fb:add-profile-tab

Renders a button that lets a user add your application or site's application tab to his or her profile

fb:fbml

This tag serves two purposes.

fb:fbmlversion

Prints the version of FBML currently in scope.

fb:js-string

This tag renders a block of FBML into an FBML block variable instead of rendering it on the page.

fb:page-admin-edit-header

For apps that can be added to Facebook Pages, this adds a standardized edit header for canvas pages so that the Page owner can easily jump to their Page's app configuration.

fb:redirect

Redirects a user's browser to a new URL within the Facebook canvas.

fb:ref

Fetches and renders content (like FBML or JavaScript) from a given ref source onto your canvas pages.

fb:serverFbml

Renders the FBML on a Facebook server inside an IFrame.

fb:time

Renders the date and time in the user's time zone.

fb:title

Sets the page's <title> tag to its contents.


Editor Display

fb:editor

Creates a form with two columns, just like the form on the edit-profile page.

fb:editor-button

Renders a button of type submit inside an fb:editor tag.

fb:editor-buttonset

A container for one or more fb:editor-button tags, which are rendered next to each other with some space between each button.

fb:editor-cancel

Renders a Cancel button inside an fb:editor tag.

fb:editor-custom

Allows you to put any content into an fb:editor block, as long as it is valid FBML.

fb:editor-date

Creates two drop down list boxes that let a user select a date.

fb:editor-divider

Renders a horizontal line separator in the column containing the form elements.

fb:editor-month

Creates a form selector element displaying the month.

fb:editor-text

Creates an <input> of type text.

fb:editor-textarea

Creates a <textarea> element.

fb:editor-time

Creates a series of form selector elements showing the time in hours and minutes, and an AM/PM indicator.


Embedded Media

fb:flv

Renders a Flash-based FLV player that can stream arbitrary FLV (video/audio) files on the page.

fb:iframe

Inserts an <iframe> tag into an application canvas page; you cannot use the tag on the profile page (that is, application tabs and profile boxes).

fb:mp3

Renders a Flash-based audio player.

fb:photo

Renders a Facebook photo.

fb:silverlight

Renders a Microsoft Silverlight control.

fb:swf

Renders a Shockwave Flash (SWF) object.


Dialog

fb:dialog

The fb:dialog tag displays a lightbox-type dialog box when a user clicks on some element.

fb:dialog-button

Renders a button for the fb:dialog popup.

fb:dialog-content

The fb:dialog-content tag is a child of fb:dialog and represents the content that gets displayed inside the popup dialog when it appears.

fb:dialog-title

fb:dialog-title is a child of fb:dialog and renders a title for what is displayed inside the popup dialog.


Additional Permissions

fb:prompt-permission

Renders the content of the tag as a link that, when clicked, initiates a dialog requesting the specified extended permissions from the user.


Social Plugins

fb:comments

Displays a Comments Box on a Facebook Connect site or in an IFrame application.

fb:live-stream

Use this tag to render a Live Stream Box social widget on your FBML canvas pages or Facebook Connect sites.


Message Attachments

fb:attachment-preview

Renders a link in a message attachment that, when clicked, replaces that attachment with newly fetched content.


Forms

fb:captcha

Renders a CAPTCHA on your canvas page inside of a form.

fb:submit

Creates a JavaScript submission mechanism for a form, which makes image or text links act as Submit buttons.


Reference

JavaScript SDK

JavaScript SDK

Updated about 4 months ago
Facebook © 2012 · English (US)
AboutCareersPlatform PoliciesPrivacy Policy