Fb:action

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Renders a link, usually for navigational purposes. Its appearance depends on its container.

The tag must be a child of either fb:dashboard or fb:subtitle.

Attributes

RequiredNameTypeDescription
required href string The URL for the link. The URL must be a canvas page. For example, href="http://apps.facebook.com/<appname>/<filename>.php".
optional onclick string Call a FBJS function

Examples

<fb:dashboard> <fb:action href="new.php">Create a new photo album</fb:action> </fb:dashboard>
Image:FBML_action.jpg


<fb:dashboard> <fb:action href="new.php">Create a new photo album</fb:action> <fb:action href="you.php">Photos of You</fb:action> </fb:dashboard>
Image:FBML_action2.jpg
This article or section needs expansion

Notes

  • The link appears in the top left of the fb:dashboard element and the top right of the fb:subtitle element.
  • You cannot use FBJS onclick, since you cannot have the href attribute set to # or javascript:. You can use the onclick attribute: use any absolute URL in the href and make sure onclick returns false to prevent the link from being followed.