Reference Guide

facebook FBML Reference Guide Page 51 of 159
Fb:comments
Description
Displays a set of comments for a unique identifier. Facebook handles posting, drawing, and see all page.
Fb:comments is essentially a wall for developers to drop on canvas pages easily. Using the tag implies a wall-
like comments set exists that can be posted or identified by the passed xid. Please note the following:
Every pageload for posting, see all page, and so forth refetches the configuration from the callbackurl
supplied. The callbackurl defaults to the page where it was originally found, so the tag should work
without any extra coding. However, you can point a callbackurl to a special page that can be more
efficient.
An fb_sig_xid parameter is passed to these pages. Facebook looks for this xid. You can use it to short-
circuit your application logic and only output the fb:comments tag with the proper parameters.
When an action occurs, the page is also passed an fb_sig_xid_action parameter. Currently this can be
"post" or "delete". If you return true for the action requested in the fb:comments tag, you can assume the
action was performed.
Note: Facebook redirects immediately to the same page again after passing the post to that page - but without
the post information.
The refetch is in the form of a POST to the URL supplied in the callbackurl, mimicking a canvas page.
Attributes
Required Name Type Description
required xid
string
The unique identifier for this set of comments. Comments can
contain alphanumeric characters (Aa-Zz, 0-9), and underscores (_)
only.
canpost
bool
Indicates whether the viewing user can post on this comment set.
candelete
bool
Indicates whether the viewing user can delete any post on this
comment set.
numposts
int
The maximum number of posts to display.
optional callbackurl
string
The URL to refetch this configuration. (default value is the current
page)
returnurl
string
The URL where the user is returned after selecting a "back" link.
(default value is the current page)
showform
bool
Boolean whether to show the form (canpost "true" only) for inline
posting. Posts using this form will not go to a see-all page after
posting, but rather refresh the page.
send_notification_uid
int
User ID to send a notification to upon someone posting a comment.
(Only one uid allowed).
www.yapish.com