Fb:action

From Facebook Developers Wiki

Jump to: navigation, search

Contents

[edit] 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.


[edit] 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 title string Specifies the text to display as a tool tip for this link. (seems to do nothing at the moment)
onclick string Call a FBJS function


[edit] 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


[edit] 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.


[edit] See Also

You can see a real world example of this tag in the Who's Showing Up demo application. Go to Demos for more details and to download and install the demo apps.