Fb:dialog-button

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Renders a button for the fb:dialog popup.

The fb:dialog-button tag is a child of fb:dialog and must be contained within it.

Attributes

RequiredNameTypeDescription
required type string The type of button. Specify button for a general button or submit for a Submit button to submit the form.
value string The label text for the button.
optional close_dialog bool Indicates whether to close the popup dialog when the user clicks the button.
href string The URL where the user is taken after clicking the button.
form_id string The ID passed with the form when it is submitted after the user clicks the button.
clickrewriteurl string This attribute is used for mock-AJAX with the dialog. See Mock AJAX
clickrewriteid string This attribute is used for mock-AJAX with the dialog. See Mock AJAX
clickrewriteform string This attribute is used for mock-AJAX with the dialog. See Mock AJAX

Examples

<fb:dialog id="my_dialog"> <fb:dialog-title>My Little Dialog</fb:dialog-title> <fb:dialog-content><form id="my_form">Do you like my little dialog?</form></fb:dialog-content> <fb:dialog-button type="submit" value="Yes" clickrewriteurl="http://www.some_url_here.com/dialog_return.php" clickrewriteid="my_dialog" clickrewriteform="my_form" /> </fb:dialog>
a screenshot is not applicable for this tag


There is no "cancel" type. To specify a Cancel/No button, use:

<fb:dialog-button type="button" value="No" close_dialog="true" /> or tell the fb:dialog to include one itself:

<fb:dialog cancel_button="true" />
a screenshot is not applicable for this tag

Notes

  • You can have multiple buttons in a dialog.
  • If you get the type wrong, the button doesn't appear at all. Facebook does not draw it.
  • BUG: You cannot use the href and form_id options together, your form variables will not be submitted to the redirected page -- please file any bugs you find.
reference