Requested FBML Tags

From Facebook Developers Wiki

Jump to: navigation, search

This is a resting place for requests for additions to the FBML tags (e.g. fb:user). This shouldn't be a wish list, but a list of feasible, reasonable requests. If there is a tag here that you want to support, second it by signing after it with four tildes (~~~~), and move it up to the appropriate category if needed. Go to the Requested Features page for feature requests that are not additions to the FBML tags.

Contents

[edit] New Requests

[edit] <button></button>

This element is far superior to the <input /> element for submit, reset and regular buttons and allows for more styling possibilities with the element supporting images within it (see the Rediscovering the Button Element article)

[edit] <fb:svg />

A wrapper for an object / embed pair of tags with type="image/svg+xml", and editable src, width and height tags to allow embedded svg objects. An <fb:svg /> would only load sources ending in .svg or .svgz, and would only display objects that pass svg validation {With svg:foreignObject being parsed as INVALID, for security}.

This would be a more future-compatible method of handling images for dynamic, animated pages. Something as simple as a variant-sized border around some images and text is nearly impossible to hack out on css, and I don't forsee anyone requesting a wrapper for the non-dynamic html:canvas objects...

[edit] <fb:graph />

A graph generating elements outputting graphs of the same style as the application stats pages.

A number of sub elements could be used that would only work within <fb:graph>

An example of how the final markup would look:

<fb:graph title="foo as a function of bar" 
caption="a relationship exists between foo and bar" 
x-title="foos" x-units="cubic foos" x-increment="50" 
y-title="bars" y-units="millimeters of bar" y-increment="10"> 
          <fb:key>
             <fb:key-entry title="foobar1" />
          </fb:key>
          <fb:line title="foobar1" color="#000000"
             <fb:plot x=100 y=20 caption="at first the bars show little effect on the foos />
             <fb:plot x=1000000 y="30" caption="then the bars start to foobar like crazy />
          </fb:line>
</fb:graph>
     

[edit] <fb:calender />

A fbjs pop up calender which will return the date selected to hidden text box. The attributes could be something like this:

date_format - The format of the date returned from the calender. func_name - A fbjs function which will be called when a user selects the date ,so that we can put the checking for the date selected and returns true or false. hidden_field-The id of the hidden field which will be populated with the selected date.

seconded by Rupesh Agarwal 1000116190 03:11, 11 February 2008 (PST)

Thirded by George Deglin 709132233 17:02, 2 May 2008 (PDT)

[edit] <fb:pagination />

This would display page numbers with the Next and Prev links for something that has multiple pages using the standard Facebook styling. The attributes could be something like this:

baseurl - the url to which the page number is appended

getvar - the name of the GET variable used to determine page

currentpage - the current page being viewed

totalpages - the total number of pages

For example, if you have a search for your app that has 4 pages of results, the tag on the first page would look like:

<fb:pagination baseurl="search.php?query=example" getvar="page" currentpage="1" totalpages="4" />

This would generate "1 2 3 4 Next" with links to those pages: search.php?query=example&page=x

This would make creating and styling pagination super easy. Also, getvar isn't entirely necessary. You could just have baseurl include the relevant part (i.e. baseurl="search.php?query=example&page=" and the number is appended to the end.

--144901082 09:17, 30 January 2008 (PST)

seconded by Rupesh Agarwal 1000116190 03:12, 11 February 2008 (PST)

6412926 00:26, 12 February 2008 (PST) Fourthed by 614148 23:15, 13 April 2008 (PDT)

[edit] <fb:marquee>

The feature of html in Microsoft Internet explorer... A sliding Marquee text like news headlines.

[edit] <fb:network-input>

A type-ahead selector for networks (as seen on the Network page, or in Marketplace), that POSTs the relevant NID on form submission. 3310189 16:23, 9 January 2008 (PST)

[edit] <fb:network-name>

Requires an NID and displays the name of the associated Network. 3310189 15:35, 9 January 2008 (PST) - i agree couse fb:networklink return link to network without linked="false" ! -- See fb:networklink (being posted on wiki today) --1414620016 16:32, 28 January 2008 (PST)

[edit] <fb:editor-textarea> cols attribute

<fb:editor-textarea> currently supports rows attribute (to define height) but not cols (to define width)

537707307 04:47, 22 January 2008 (PST)

Additionally it would be great if in the <fb:editor-text> there would be the equivalent of the HTML "size" (size="XX") command for the length of the field to be displayed as an option.

seconded by Rupesh Agarwal 1000116190 03:12, 11 February 2008 (PST)

[edit] <fb:editor-radio> AND <fb:editor-checkbox>

Would use something like <fb:editor-option value="option1" label="Something To Check" sublabel="Click this for fun, it lets you do stuff" /> to build a checkbox or radio button selection system

seconded by Rupesh Agarwal 1000116190 03:12, 11 February 2008 (PST)

third 1238220249 06:40, 17 February 2008 (PST)

fourthed by Trevor Smith 28502608 14:00, 27 February 2008 (PST)

fifthed --612710542 22:22, 13 April 2008 (PDT)

eighteentithed

[edit] <fb:collapseable>

Allows the creation of a div with a header that behaves like the header on profile boxes. Header defined by either sub-tag <fb:title> or by a header property. Other property would be spawnstate, which would define if it spawned opened or closed, and rememberstate, to define if it sets a cookie to remember its state. 826204827 16:23, 26 November 2007 (PST)

[edit] <fb:privateTalk>

Allows to add a conversation thread between limited numbers of Facebook's users. The look-n-feel is similar to the regular Facebook's mail. The motivation for this tag is adding to the application the ability to organize the conversation between two or more people that is stored on the Facebook's side, but in the database of the application. I.e. to guaranty the true privacy of the chat, but not mixed with regular mailbox.

Example of usage:

<fb:privateTalk xid="unique_one_generated_by_appl" uids="uid1,uid2" candelete="uid1" />

If Facebook does not yet contain the privateTalk with this xid, it is created using the uids and candelete attributes. Otherwise, if the privateTalk exists, the uids and candelete are ignored.

Nobody, unless the declared with uids users, cannot see the conversation. Attempt to access causes an error message.

After the privateTalk is created, nobody, including the application owner, can change the settings. The list of participants is shown at the top of the conversation to exlude possible cheating from an application owner.

Strongly seconded! 614148 11:37, 13 April 2008 (PDT) A more visually compact UI version of fb:comment is what I was thinking. It would also be great if the text box for posting could be broken out into a separate tag(linked to each specific thread via xid param) so we could position on a page as we'd like. This would give even more flexibility in how we implement the UI(Very useful).

Proposed alternative name: <fb:thread>

To Vote for this enhancement, please reference bug #1967 http://bugs.developers.facebook.com/show_bug.cgi?id=1967

[edit] <fb:is>

Now that conditional fbml tags aren't allowed in profiles there's no way to construct statements in present progressive when displaying names with useyou set to "true". This tag would have two attributes: "subjectid", the subject of the sentence and "tense", the tense we want to conjugate "is" to......
11523240 19:00, 11 November 2007 (PST)


[edit] <fb:google-geocode>

This should return a lat and long given an address (stree, city, state, zip)

it should return a latitude and longitude given only a user, facebook would then use their full current location to figure this out, or however much they deemed appropritate seconded by Trevor Smith 28502608 14:02, 27 February 2008 (PST) Thirded by Brian Kenna 614148 11:31, 13 April 2008 (PDT)

[edit] <map></map>

This is for adding clickable areas onto images. (http://www.w3schools.com/tags/tag_map.asp) 422630 16:20, 29 October 2007 (PDT) Additionally, I believe we would need <area></area> to make this work.--23211626 15:24, 3 February 2008 (PST)

[edit] <fb:div></fb:div>

It is basically identical to the <div></div> tag, but has the attribute of smartsize, just like fb:iframe. This is so that programmers can have their FBML pages inside a div tag with scrolling. Hope this will be implemented --511452970 15:24, 24 October 2007 (PDT)

[edit] <body></body>

Does absolutely nothing, have no attributes, allows programmers to switch between fbml and html easier. I would love this tag. --511452970 13:41, 24 October 2007 (PDT)

[edit] <fb:dcr> Embed Shockwave/Director .DCR files

There needs to be a way to embed Director DCR files (Shockwave). Seems like this could just be a simple mod of fb:swf. Much appreciated!

+1 for this, thank you 802500626 02:54, 25 January 2008 (PST)

[edit] <fb:ref-uid> Post user_id with ref

This will help all non PHP programmers to request user specific information by automatically supplying the uid in the query string.

EX: <fb:ref url="http://www.site.com/data.aspx" /> The page will recognize http://www.site.com/data.aspx?uid=xxxxx

This tag will automatically call the function “fbml.refreshRefUrl” since it’s intended to call dynamic information.

Please Second this...

218471 19:15, 27 September 2007 (PDT)

[edit] <fb:if-photo-exists> Check if a photo exists

Simple tag that will check if a photo PID actually exists so users don't get the "PID not found" error. Thanks, Chris. 525336368 08:01, 14 September 2007 (PDT) 646477348 08:13, 19 March 2008 (PDT) 1153488843 08:29, 19 March 2008 (PDT)

[edit] <fb:req-choice> Multiple buttons

I would like my users to be able to say, Coming, Not Coming as well as the standard Ignore so I know they have responded. Is there a way to have multiple <fb:req-choice> buttons on a sendNotification and its related <fb:request-form> tag. At present it takes the last and adds the Ignore. Ignore does not do the job because I am not notified they did the ignore.

If this can already be done by some other means could somebody please point the way. Thanks, Steve. --600254847 08:22, 31 August 2007 (PDT)

[edit] <fb:attribute name="xxxxx"/>

A block that can contain FBML that bubbles an attribute to the parent node. This lets you put FBML in tooltips etc.

[edit] Example
<a href="http://example.com">
 <fb:attribute name="title">
  Last updated: <fb:time t='x'/>
 </fb:attribute>
 Link text
</a>

Would render:

<a href="http://example.com" title="Last updated: 04:30pm">
 Link text
</a>

[edit] <fb:online_now uid="xxxxx"/>

Would display "online now" if the uid is online now, nothing if not. Very simple and useful. 696676745 16:33, 17 August 2007 (PDT)

Or <fb:if-online_now uid="xxxx"/>
second. 643500144 09:01, 11 November 2007 (PST)

third: 587730087 00:16, 8 December 2007 (PST)

I agree this is necessary functionality; possibly it should be an attribute of users.info? --639031702 23:14, 16 December 2007 (PST)

874260505 05:58, 15 January 2008 (PST) agrees

seconded by Rupesh Agarwal 1000116190 03:13, 11 February 2008 (PST)

[edit] <fb:time-since t="1180502413" />

Just a slight variant of <fb:time>. It would render the amount of time that has passed since "t" -- displayed in the same way as discussion post times ("5 minutes ago","7 hours ago"). --Mitch Dempsey 18:26, 30 December 2007 (PST) 767335476 01:56, 28 September 2007 (PDT)

[edit] <fb:app-friend-count> tag

A tag which is rendering facebook.friends.getAppUser result and output friend count of an application. It is discussed here.

Thank you,
Parahat Melayev
--788774866 03:45, 14 August 2007 (PDT)

[edit] <fb:fbml> attribute - skip=true|false

It would be a great convenience to be able to "comment out" sections of fbml code. The system I use at some point in the rendering of the FBML needs to make a decision whether to include or not include what is following (in the template file). Presently I stick a version="99.9" in and the following fmbl text down to the matching /fb:fbml disappears which is what I want. Facebook does however complain about the invalid version when the developer uid uses this trick. The skip=true|false construct would achieve this behavior in a clean manner.

The simple alternative would be to make <fb:if value=true|false> work. It seems to have disappeared from the docs.

  • It looks to me like <fb:if value="true"> and <fb:if value="false"> works just fine. I've added documentation for it to the Wiki. 713299357 14:09, 8 August 2007 (PDT) (not a Facebook employee)
  • Thanks for the doc update. I solved the mystery, Yes it does work, but not inside the <fb:dashboard>. A check of the doc for <fb:dashboard> would imply it may not since only 3 tags are allowed inside (action, help and create-button). It would make sense if <fb:if> did work. Iffing around the <fb:action> selectors is a very simple way to hide developer or advanced user functionality from the user base at large. So for now I will resort to the <fb:fbml> version trick which did work. Steve. 819758097 17:41, 8 August 2007 (PDT)

[edit] <fb:wallpost> attribute - ppid

Proposed attribute for the fb:wallpost tag: ppid - the id of the post that this post is in reply to.

ppid - stands for "parent post id".

Facebok can use this post id to determine which post (if any) this wallpost is in reply to, and who made the post that this wallpost is in reply to, and as a consequence render the 'replied to username's post' just like in the boards.

This would allow <fb:wallpost> to become a useful and more flexible component to create custom discussion boards. 706757460 22:48, 31 July 2007 (PDT)

[edit] <fb:if-can-see-event>

Similar to if-can-see-photo, shows the stuff inside if the user can see the event with the event ID inside of it

[edit] <fb:event>

Returns information based upon the EID sent to it, defaulting to the name.



[edit] <fb:tab_item /> title

The title should be able to be specified between non-self-closed tags, to allow for nested FBML e.g.

<fb:tab-item href="www.url.com" selected="true"><fb:name uid="12345" possessive="true"> Quotes</fb:tab-item>

The -/_ issue still needs to be fixed too. --42904324 18:33, 18 July 2007 (PDT)

[edit] <fb:image-url />

Allows for upload of images to Facebook via their URL (instead of via just your desktop computer).

<fb:image url=""/>

[edit] <fb:autocomplete />

Mimics the type-ahead <fb:friend-selector> auto-complete functionally. Right now I can only do this using Javascript within an IFrame.

<fb:autocomplete label="" name="">
  <fb:param value="Suggestion 1"/>
  <fb:param value="Suggestion 2"/>
  <fb:param value="Suggestion 3"/>
</fb:autocomplete>

This request was seconded

Agree this would be useful. Would be even more useful with a fb:param that does a query back to a server for autocomplete content.

  <fb:auto_param sourceurl="" pretext="Begin typing a name..." />

However both of these capabilities exist using FBJS for the former and MockAJAX for the latter and are described elsewhere on this wiki. Javascript in iframes is not necessary.

[edit] <fb:autorefresh />

Automatically refreshes the id specified in an attribute with the content of a URL (facebook-safe) at a given interval in seconds. For example: <fb:autorefresh id="mydiv" url="http://yourco.com/mycontent" rate="30" /> 731684051 19:51, 5 December 2007 (PST)

--625444647 07:37, 6 December 2007 (PST)Tried to second this but the 4 tilde thing didn't work - trying again 625444647 07:18, 6 December 2007 (PST)

[edit] <fb:profileowner />

Inserts the uid of the profile owner, so that you can access it with pure FBML. Used, for instance, in a link where you wanted to post the user id in the url (http://apps.facebook.com/example/example.php?uid=<fb:profileowner />)

  • I agree! 3629113 23:57, 29 August 2007 (PDT)

891495103 04:38, 3 September 2007 (PDT)

[edit] <fb:viewer />

Inserts the uid of the viewer, so that you can access it with pure FBML. Used, for instance, in a link where you wanted to post the user id in the url (http://apps.facebook.com/example/example.php?uid=<fb:viewer />)

  • I agree! 3629113 23:57, 29 August 2007 (PDT)

507237626 10:19, 22 September 2007 (PDT)

[edit] <fb:dashboard>

The dasboard needs a couple parameters before we can really use it. (note that none of the large applications are using it.)

  • custom title or variable to hide the default title (this is most important, we are going to have to write our own until we get this.)
  • ability to change the text in a <fb:help> tag. (which is really a right aligned action...) Currently the specified text is ignored and everything is just labeled "help"
  • an <fb:actionlist [title=""] > container tag, to allow for drop down menu type actions.

507237626 10:17, 22 September 2007 (PDT)

[edit] <fb:canvas>

If we had <fb:canvas> to supplement <fb:wide> and <fb:narrow> we could target a single piece of FBML for all three content areas, simplifying our code paths.

--222402510 01:02, 3 January 2008 (PST) Seconded!


596055556 14:48, 4 March 2008 (PST) Seconded!
551968797 18:28, 13 March 2008 (PDT) Seconded!

[edit] <fb:swf> tags

  • It would be good if the session_id of the current user could be passed in with appvars.
  • The ability to leave the wmode attribute blank / set it to "default". Some browsers do not properly render flash objects when they are enclosed within an "overflow:hidden" div.

[edit] <fb:editor> tags

An optional "highlight" attribute for many of the <fb:editor-*> tag would be nice, which could highlight the field in red, indicating an error (for example, someone omits filling in a field on your form, and you want to point it out to them.) 568623702 18:54, 10 February 2008 (PST)

Tag for an <fb:editor> field - perhaps an attribute (tag and position - below, above, left, right) for the existing <fb:editor> fields?

Ability to make a file upload form. Perhaps a file-upload attribute for fb:editor that inserts 'enctype="multipart/form-data"'.

The ability to specify name, id, and style attributes for <fb:editor> tags, so fields can be used with clickto*.

For expanding on the purpose of a field, like on the App Editor page, where there is small grey text below the fields:

Image:labels-like-this.png

I would envision the code like this:

<fb:editor>
   <fb:editor-text label="This field is a test field." label-pos="below"/>
</fb:editor>

or

<fb:editor>
   <fb:editor-text/>
   <fb:editor-label pos="below"/>This field is a test field.</fb:editor-label>
</fb:editor>

Which would apply to the last field...but that might get complicated.

  • Note that you can always do this by looking at Facebook's CSS and then just using a regular form with that CSS. You even have more control than with fb:editor... Sciyoshi 15:07, 5 June 2007 (PDT)
  • The problem with doing it manually is that your webserver/script ends up needing to send back more data. But yes, doing it manually gives much greater flexibility. --Skyler Clark 4:18 AM, June 06, 2007 (EST)

An attribute for editor fields to denote a required field. Would result in "(required)" label appearing below field title (like on Create Group page and others).

How about:

<fb:editor>
   <fb:editor-text label="Callback" maxlength="100" sublabel="The url where your callback will post."/>
</fb:editor>

Would convert to Image:labels-like-this.png


[edit] <fb:if-continent>, <if-country>

Would add the ability to block certain content from certain countries or geographical areas.

[edit] <fb:cached-image>

Grabs a cached image from Facebook servers for use on canvas... if the image isn't already cached, it caches it.

  • Would be fine just <fb:img src="..." width="..." height="..."/> .. just like a regular <img> tag. You're just declaring to FB that you don't mind if it wants to cache it, and in fact you'd prefer they did. --RickMeasham 16:17, 4 June 2007 (PDT)
  • This would be much like how fb:ref is handled. The image would be given a handle and facebook servers can be told to refresh the image using the API. --Skyler Clark 4:20 AM, June 06, 2007 (EST)
  • This would be ideal as images in facebook photo albums have reduced quality, while the cached images do not.

(How would this differ from the way <img... is already cached? UsageNotes/Images - 717400660 16:20, 7 October 2007 (PDT) )

[edit] <fb:pager>

Outputs a Facebook 'sanctioned' piece of HTML to indicate paging. Suggested interfaces:

 <fb:pager items="43" per_page="10" start="10" />

would output something like: 1 [2] 3 4 5

Returning parameters like: fb_pager_start=10&fb_pager_perpage=10

 <fb:pager pages="10" current="2" />

would output something like: 1 [2] 3 4 5 6 ... >>

Returning parameters like: fb_pager_page=2

Seconded by Vindexus 13:06, 25 September 2007 (PDT)

Thirded by Shane Vitarana

Fourthed by Travis Caruth 15:04, 5 October 2007 (PDT)

Fifthed by Trevor Dilley 15:04, 5 October 2007 (PDT) Sixthed? by Mitch Dempsey 18:31, 30 December 2007 (PST) 607128670 06:23, 30 January 2008 (PST)

[edit] <fb:rel-time>

  • Takes one parameter 't', which is an epoch value.
  • Returns the relative time since or to this value. Eg: "2 minutes ago", "2 hours time"

[edit] <fb:editor-date>

  • Allow different formats for the month strings.
  • Enable a year selector. (I can't believe the year isn't included already).

[edit] <fb:search-box>

  • Auto-clearing search box with magnifying glass.
  • Params: <fb:search-box action="?action=sendform" default="Anytown, USA" clearonclick="true" value="New York, NY"/>

+1 by Shane Vitarana

+1 by Chris Tata

+1 by Jason Craig

+1 by Nima Negahban

+1 by Derek Ivey


Guys, here is a self contained substitute:

<input type="text" style="border:1px solid #BDC7D8;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;padding:3px;background:white url(magglass.png) no-repeat scroll 3px 4px;"/>


-Nima

[edit] <fb:summary-bar>

We see these mainly in photo albums right above the album. They say something like "Photos 1 - 20 out of 28|Back to Bob's Photos" and usually have a nav bar on the side.

<fb:summary-bar> would take the following children.

  • <fb:nav-links>: This would make it possible to create navigation links.
  • <fb:summary>: The actual summary.

[edit] <fb:photo-album>

Create a Facebook-style photo album. It's children could either be <a> with <img/> as children, <img/>, or <fb:photo/>

I would also propose one additional attribute to <fb:photo/>: link="true|false". This would create a link to the photo, making the <img/> a child of an <a href="http://www.facebook.com/photo.php?pid={pid}&id={uid}" alt="{caption}">

Seconded: --660106809 19:18, 1 October 2007 (PDT)

[edit] <fb:query_string>

Just to make a query string, as $_SERVER['QUERY_STRING'] doesn't work. It will receive what is on the script's server, not the facebook server. This way we can do "?success" instead of "success=true" or something.

Tried using array_keys($_GET)? That'll work.

[edit] <fb:network>

Returns the (primary) network for the given uid. 41502060 08:57, 16 August 2007 (PDT) 692482051 00:13, 21 December 2007 (PST)

[edit] <fb:website>

Returns a link to the website entered by the user in the user's contact info. There are typically no privacy issues with making this website available to apps. The syntax would be <fb:website uid="123456">Label</fb:website>

[edit] Alternate FBML for SWF tags

A tag to specify alternate FBML to display if the user does not have the Flash runtime installed. Another tag (or an attribute of the first tag) to specify alternate FBML to display if the user does not have a particular *version* (or higher) of Flash installed.

[edit] fb:editor-custom label

If the label="" attribute ends in a question mark (?), do not display a semicolon (:) after the label. --584756458 11:03, 9 August 2007 (PDT)

[edit] <fb:friend-selector/> and <fb:multiple-friend-selector/> limiter/expander

I use both the multiple-friend-selector and friend-selector on my app and would like to limit the users it displays to app users. Maybe by having an option limit_users="true" or even better an option with a comma separated list of uids, such as limit_users="xxxxx,yyyyy,zzzzz".

Alternatively, it would be helpful for select expansion, such as the ability for the user to select them-self from the list (include_user="true")

[edit] <fb:invisible-to-*>

A set of tags to complement the visible-to tags: <fb:invisible-to-owner>, <fb:invisible-to-friends>, <fb:invisible-to-user>, etc.

The profile owner could still see the content inside <fb:invisible-to-*> through a "show hidden content" link or similar.


--I'm sorry but this is just a terrible request. Facebook had a reason to stop apps from hiding things on a users profile and this really wouldn't help. It would still be rendered but your average user doesn't check the source code of the page to see what the app has put on their profile, therefore making the entire 1.1 change for nothing. --1414620016 20:57, 16 August 2007 (PDT)

--This is necessary for implementing legitimate functionality that wouldn't otherwise be possible: poke applications that shouldn't let you poke yourself, enhanced privacy settings, etc. I understand the reasons for Facebook doing what they did, but there are other ways to solve the problem that don't break existing applications. The user wouldn't need to view the source to see what was being hidden on their profile; they could just click a link that shows all the hidden content, as per the request. Or, pop up a window that says "there is other content on your profile that you can't see; here's what it looks like." Taking away functionality is a terrible way to fix security issues. (It only encourages more questionable behavior from trying to get around it, often originating from a legitimate purpose.) You should be sorry. 6415618 21:17, 16 August 2007 (PDT)

--I second the request for <fb:invisible-to-user>, or an else clause in visible-to-user. I'd like to hide things on the profile page not from the profile owner, but from some visitors to his/her page. One of the key features of my app (http://apps.facebook.com/secretboard) was a summary on the profile page of items which some users could not see. Now thanks to the abuse of some app developers, I no longer have that feature.

--Instead of changing your original request and then creating a counter-argument, maybe you should defend your original request in your response. Thanks --1414620016 23:49, 3 September 2007 (PDT)

--Ummm, I didn't change my original request at all. --6415618 07:57, 8 September 2007 (PDT)

[edit] <fb:time usepreposition="true|false">

A useproposition="true" attribute on the <fb:time> tag would insert the word "at" before the time if it shows just a time, or "on" before the date and "at" before the time if it shows a date and time. This attribute is helpful because without it, a developer must just use "at," which looks wrong if the date gets printed as well as the time.

Examples: <fb:time t="1180502413" usepreposition="true"/> would print:

"at 12:37pm" if today is May 29th
"on May 29 at 12:37pm" if today is not May 29 but still in 2007
"on May 29, 2007 at 12:37pm" if this year is not 2007

[edit] <fb:content> for <fb:request-form>

<fb:request-form> should have <fb:content> to hold the request content rather than an attribute. Having to encode FBML to go into an attribute is a PITA.

[edit] <fb:display-friended-users> - Implementation of the fb:multi-friend-selector

Allow fb:multi-friend-selector to display friends of the user THAT HAVE ADDED THE APPLICATION.

[edit] <fb:privacy>

Attributes:

  • uid="uid" — The user ID of the user who owns the content. This is so that <fb:privacy> can be used on canvas pages. Default: "profileowner."
  • limited="true|false" — If "true," the content may be displayed on limited profiles; if "false," the content will never be displayed on limited profiles. Default: "true."
  • friendsonly="true|false" — If "true," only friends of the profile owner may see the content. If "false," users do not have to be friends with the profile owner to see the content. Default: "false."
  • appuseronly="true|false" — If "true," only users who have logged into or added this app may see the content. If "false," users do not have to be logged into or have added the app to see the content. Default: "false."
  • appaddedonly="true|false" — If "true," only users who have added this app may see the content. If "false," users do not have to add the app to see the content. Default: "false."
  • allow="uid1,uid2,uid3" — A list of user IDs that may see this content. If the user is not on this list, they will never see this content. The profile owner's user ID is implicitly included in this list. Default: all users.
  • deny="uid1,uid2,uid3" — A list of user IDs that never see this content. Only if the user is *not* in this list may they see the content. If the profile owner's user ID is included in this list, the profile owner's user ID is ignored. Default: no users.
  • allownetwork="nid1,nid2" — A list of network IDs that may see this content. If the user is not in any of the networks in this list, they will never see this content. This restriction does not apply to the profile owner. Default: all networks.
  • denynetwork="nid1,nid2" — A list of network IDs that never see this content. Only if the user is *not* in any of the networks in this list may they see the content. This restriction does not apply to the profile owner. Default: no networks.

In addition, <fb:privacy> has the following properties:

  • <fb:privacy> may be used anywhere inside the profile content, and may be used multiple times. This allows different parts of the profile content to have different privacy settings. In other words, this makes it "fine-grained."
  • Every attribute is optional, and may be all included at once. Every criterion must be satisfied for the information to be displayed to the user; if any one criterion fails, the content inside the tag is never displayed.
  • "Display" in this context means "send to the browser," and "see" means "find in the page source." In other words, this solves the problems with <fb:visible-to-*>.
  • The profile owner ***always*** sees the content inside an <fb:privacy> tag, regardless of its attributes. In addition, <fb:else> will *not* work inside <fb:privacy>, so you can never hide anything from the profile owner. This solves the problems with <fb:if-*>.
  • If the entire profile content is wrapped in an <fb:privacy>, and the user is not allowed to see the content, the entire profile box is removed. This allows users to hide existence of the application from other users if they desire. A blank profile box (or one that just says "no content to display," for that matter) is useless anyway.

Bugzilla report here: [1]

[edit] Seconded Requests

[edit] <fb:swf> tags

  • An attribute to specify the minimum Flash player version (currently always set to 5.0!!)
    • seconded by Rupesh Agarwal 1000116190 03:13, 11 February 2008 (PST)
  • add option to enable AllowFullScreen - which would allow the user to go fullscreen if they have flashplayer 9 installed and the flash swf allowed it. Adobe has built in a number of safe guards - the transition to fullscreen must be initiated by a user interaction, and the embedding html must allow fullscreen mode as well. Right now, I couldn't find a way to turn on AllowFullScreen.


[edit] <fb:google-maps>

This should render a google map given a lat and long
558546712 04:26, 6 November 2007 (PST)

Seconded - except that it should instead have a bunch of suboptions to do most of the basic Google Maps stuff (perhaps let you point it at a KML file?) :: Keith Gable 20:28, 10 December 2007 (PST)

seconded by Rupesh Agarwal 1000116190 03:13, 11 February 2008 (PST)

[edit] <fb:app-link>

Renders a link to any application's about page (specified with id="xxxxxx" or apikey="xxxxxxxxxxxxxxx") with the application icon, in the same manner as in the left-side navigation menu.

+1 Tim Harding

59400139 12:47, 27 November 2007 (PST) Seconded. Please add this soon!

1190307405 10:21, 28 April 2008 (PDT) Richard Lynch, would also like links and #fragments to all other standard elements, such as reviews, boards, wallposts, etc. Building a library or dev/alpha/beta/production app without this means you have to do a lot of work just to output a link to your own app.

[edit] <fb:wide> Limit Application to wide or narrow columns

Rather than making it necessary to add text to the unapplicable column, allow to enable the same error message that exists for applications such as The Wall and Friends in Other Networks.

  • Second. Please add this! --710891035 19:55, 25 October 2007 (PDT)
  • Third. This seems like a no brainer.
  • Forth. Would also appreciate this feature.
  • Fifth. 551968797 18:31, 13 March 2008 (PDT)
  • Sixth. my picture goes wrong

[edit] <fb:wallpost-action> - Mock Ajax/Ajax support for href attribute

Allow the href attribute to call functions for mock Ajax and FBJS Ajax rather than requiring it to be absolute

Seconded by 1221592 07:51, 19 November 2007 (PST). Could you please leave the "onclick" in, so that the fbml wall can behave like the actual wall?

I agree, it would be nice to be able to have an ajax action for deleting wall posts. So the onclick on wallpost-action would be what we need.

[edit] <fb:stylesheet/>

It would be nice to have some way of including external CSS stylesheets. This would mean that users benefit from only having to download CSS for an application once.

I imagine that it would work something like this:

  • The app developer could create a CSS file and include it with an FB tag <fb:stylesheet href="..."/>.
  • Facebook would request this file and parse it, adding in the app id to restrict it to the content of the app.
  • Facebook would include a <link> tag in the HTML they send to the browser. This would retrieve the parsed version.

This could even be cached by FB so they don't have to parse the file every time.

Seconded by --694282790 15:08, 5 October 2007 (PDT)
Seconded I believe it's an unnecessary waste of bandwidth --640231402 16:08, 5 October 2007 (PDT)
Seconded This is really needed. And having it cached would be so great. --Datacide 20:14, 6 October 2007 (PDT)
Seconded --659073068 07:39, 30 October 2007 (PDT)

516962510 16:30, 27 November 2007 (PST)

seconded by Rupesh Agarwal 1000116190 03:14, 11 February 2008 (PST)

[edit] <fb:wallpost> verb attribute

Allow a verb to be specified that will replace "wrote" in the "UserX wrote" text rendered from an <fb:wallpost> tag. ie: <fb:wallpost uid="xxx" verb="scribbled">

710596712 08:56, 24 October 2007 (PDT) Gives it a lot more versatility, while keeping within a good style

Seconded (1216805562 16:11, 8 May 2008 (PDT)) this would be very awesome

[edit] fb:ref attribute - timeout

I propose a new attribute - timeout - to be added to the fb:ref tag. It would only have effect if the url= attribute is used (i.e. has no effect if handle= is used).

timeout=<int> (default 0 for current behaviour)

If this attribute is ommited, or set to 0, then the cache for the fb:ref value never expires. This is the current behaviour.

If the attribute is set to a positive integer then this is a "timeout" cache expiry value in minutes. If set, the Facebook system should expire the data in the cache for the given url after that many minutes (i.e. now() + timeoout). This is probably much more efficient than having cron jobs on application sites do a fbml_refreshRefUrl() on a regular basis (or the "clearRefUrl" call requested in the Requested Features page).

To avoid too much extra load there could be a minimum limit of, say, 60 minutes: i.e. a setting of timeout=60 .

- Ian Rogers

Totally agree this functionality would be highly useful. I would recommend the attribute name be something more like 'expires', but that's just semantics. --4800857 09:30, 22 August 2007 (PDT). I think if the attribute was named "expires" then it should be a timestamp sometime in the future to match the semantics of HTML cookie "expires". Ie. expires = now() + timeout 717400660 21:26, 19 October 2007 (PDT) . 553885591 09:33, 13 November 2007 (PST) An 'expires' timestamp would not work. The timestamp would either be ahead of current-time: no refresh, or behind current-time: constant refreshes. It works for cookies because the timestamp is sent allong with the data to be cached. Here the timestamp is external to the data to be cached making it impossible to sync.

I too think this is definitely necessary - the one thing I would add is that the backend would need to be smart on the fb side - if my app had 200,000 Users and there are 200,000 unique URLs then hitting a box all at once would bring it to it's knees - if the FB side respected the time the URL was added and then did the cache update of the URL based on that, then it would be awesome - the natural curve of when the URLs were added would prevent the mass reload 'all at once' effect. This is defintely something we need to get added :) 754089574 11:59, 23 August 2007 (PDT)User:754089574 . This would only be an issue if your app added 200,000 refs at the same with the same timeout value (or all the "add time + timeout"s) coincided. I think that's very unlikely :-) 717400660 21:26, 19 October 2007 (PDT) .

To get this noticed I've now added it as http://bugs.developers.facebook.com/show_bug.cgi?id=455 717400660 21:32, 19 October 2007 (PDT)

553885591 04:50, 13 November 2007 (PST)

I suggest that the attribute be called "max_age" and the value be in seconds (to be compatable with time()).

If you want your page to be updated every day, you can 'hard code' the attribute as: max_age="86400".

I you want your page to become stale at a specific time of day (e.g midnight on YOUR SERVER) you can calculate the max_age thus:

$aTimeNow=localtime();

$secondsSinceMidnight=($aTimeNow[2]*3600) + ($aTimeNow[1]*60) + $aTimeNow[0];

$max_age=86400-$secondsSinceMidnight; # seconds till midnight

fb:ref max_age="<?php echo $max_age ?>"


An 'exprires' attribute with an absolute date-time, as has been suggested above, can be problematic to calculate because it depends on your own server's clock settings, time zone, and daylight-savings being synchronized with "facebook time".

[edit] <fb:multi-friend-input uid="xxxxx"/>

The ability for the multi friend input to take in uids for prepopulation. This is the case when the user is coming from a individuals profile and the app doesnt want to forget they pre-selected that individual. <fb:multi-friend-input width="350px" border_color="#8496ba" uid="XXXXXXX,YYYYYYY" />

59400139 19:48, 11 October 2007 (PDT)

[edit] <fb:news-feed-quote>

Allow applications to push fancy looking quotes into the news feed when a user submit's some sort of text (likely a comment). Anything displayed within the news-feed-quote would be displayed in the same manner as when a users posts to a friend's wall.

590719129 18:11, 6 October 2007 (PDT)


[edit] <fb:applet> Applet media support

This seems to be the only media type not supported. At the moment, we have to put this in a fix iframe which isn't very good. 601725894 17:34, 29 February 2008 (PST)
I agree 3629113 12:16, 21 September 2007 (PDT)
601725894 17:34, 29 February 2008 (PST) Thirded: I have the same issue.
+1 denka

[edit] <fb:tab-item> attributes

An attribute that disables a tab, rendering it unclickable. An example of this is the Events application: the "Create a new Event" page has a tabbed form with some grayed-out tabs. <fb:tab-item title="Step 2: Fill form" disabled="true"/> is one example of a possible implementation.

Second that 649151275 19:56, 12 September 2007 (PDT): This is a good way of showing the progression of the transaction while maintaining the logical order of the pages viewed in the whole transaction.

Also the ability to make tabs dynamic IE clicktohide/clicktoshow/clicktotoggle and/or onclick. Having the tabs load data when clicked without leaving the page would be an awesome addition. Also very easy to add in.

[edit] <fb:app-canvas-url>, <fb:app-info-url>, <fb:app-add-url>

Seconded by 4813235 16:36, 11 September 2007 (PDT):

  • app-canvas-url will insert the url of the app's canvas page (http://apps.facebook.com/appname/) This will be very helpful in case for keeping profile box links current if the app name changes.
  • app-add-url will insert the url of the app's info/add page, like http://www.facebook.com/apps/application.php?id=xxxxxxxxxx (blocked linking by using <nowiki></nowiki>)

[edit] Comma-delimited user list for <fb:visible-to-user>

fb:if-is-user accepts a comma-delimited list of users for the uid attribute. fb:visible-to-user does not (it only works for the first uid in the list if you try). It would be nice to be able to specify multiple users for fb:visible-to-user as well.

Seconded by 1454130228 16:43, 26 August 2007 (PDT): A comma-delimited list offers one of the few ways to satisfy both Facebook and the developer without plaguing the user with repetitive profile entries caused by the confines of the new FBML v1.1 changes.

59400139 13:08, 31 October 2007 (PDT)

Fourthed by 10500323 23:58, 31 January 2008 (PST)

Fifthed by 607576946 18:27, 9 February 2008 (PST)

Sixthed by 694146114 17:11, 29 February 2008 (GMT+11)

[edit] <fb:visible-to-network>

Like <fb:visible-to-user>, but for whole networks.

Seconded by 713299357|200273 19:37, 16 August 2007 (PDT): Needed as part of the removal of if-* from profiles. Unseconded by 713299357 08:39, 18 August 2007 (PDT) Actually it looks like the current tah that does this will still work in FMBL 1.1 so this is not needed. Seconded by User:19715525 7th September 2007 (PST): Because fb:is-in-network no longer works in the profile FBML.

[edit] <fb:verb>

Renders a commonly-used verb (to be, to have, to do, and similar) in the proper tense for a profile page. E.g., if the profile owner is the current viewer, <fb:verb infinitive="be"> renders "are" (as in "you are"); otherwise, it renders "is" (as in "Mark is").

Seconded by 713299357 19:37, 16 August 2007 (PDT): Needed as part of the removal of if-* from profiles. Doing the equivalent is one of the major uses of If-* that are completely legitimate and will be broken by the change.

Thirded by 203070

Fourthed by 1454130228 16:41, 26 August 2007 (PDT)

Fifthed 506608698 14:21, 29 August 2007 (PDT): Perhaps rather than using commonly-used verbs, it could be more like <fb:verb firstperson="am" secondperson="is" thirdperson="is" firstpersonplural="are" secondpersonplural="are" thirdpersonplural="are" uid="xxx" /> (or perhaps be called fb:conjugate) so that any verb could be used. A bit more work for developers but more extensible.

Seconded the Fifth by Travis Caruth 15:09, 5 October 2007 (PDT)

Seventhed by Luke 03:26, 25 October 2007 (PDT) I wasn't aware of this page, and have filed a bug request asking for this feature: http://bugs.developers.facebook.com/show_bug.cgi?id=514

Eighthed by 835039773 03:08, 21 December 2007 (PST)

[edit] <fb:autocomplete/>

Mimics the type-ahead <fb:friend-selector> auto-complete functionally. Right now I can only do this using Javascript within an IFrame.

<fb:autocomplete label="" name="">
  <fb:param value="Suggestion 1"/>
  <fb:param value="Suggestion 2"/>
  <fb:param value="Suggestion 3"/>
</fb:autocomplete>

Seconded by 42904324 11:57, 10 July 2007 (PDT) - Something like this would be very helpful, acting like a friend box, but with a developer-specified list of choices. Optionally, have a parameter that would go where the person's network is. My revised suggestion, with the options filled in like a friend box for clarity:

<fb:autocomplete label="friends" name="autoselect" idname="uid">
  <fb:option value="12345678" caption="University of Washington">Joe Blow</fb:option>
  <fb:option value="98765432" caption="Harvard">Bill Gates</fb:option>
  <fb:option value="55555555" caption="Olympia, WA">Randy Bowman</fb:option>
</fb:autocomplete>

Seconded by Red 12:05, 10 July 2007 (PDT):I would like to see this but done in an AJAX style. For some inputs with huge ranges, a static autocompletion list will not suffice. Consider an autocomplete field for movie titles--there are tens of thousands. Though of course if there are fewer than a thousand options, a static autocompletion list would work fine. Using the example of an fb:autocomplete tag:

<fb:autocomplete label="" name="" suggestion-callback="http://mysite.com/myapp/suggest-animals">
</fb:autocomplete>

where http://mysite.com/myapp/suggest-animals?input=d would return

<fb:suggestion value="12345123">Dobson's Shrew Tenrec</fb:suggestion>
<fb:suggestion value="129346783">Dog</fb:suggestion>

Seconded by Alex Gaynor 2:30, 10 July 2007(CDT): This tag would be a great addition, just having it in the form of <fb:options> is fine, because one could (in PHP) do:

<fb:autocomplete label="City">
<?php
$query="SELECT city FROM United States";
$result=mysql_query($query);
while($city=mysql_fetch_assoc($result))
{
echo "<fb:option value='" . $city['city'] . "' />;
}
?>
</fb:autocomplete>

Seconded by Mike Hungerford 11:41, 12 July 2007 (PDT): This would be excellent, maybe make optional parameters such as "choices=" and you can make it set as "friend app_xxxxxxxxx users" or "app users" or "network xxxxxxxxx members" or "online now friends". They wouldn't be that long, because Facebook finds shortcuts, but I was actually going to make a request for the friends with app selector. This would work just as well, so you could have something in PHP like:

<fb:autocomplete choices="friends_app_xxxxxxxxx_users" />

maybe more parameters, such as in <fb:friend-selector> lets say Joe, Bob, and Jim use this app. They would appear just like in an <fb:friend-selector> maybe make it just "choices="friends_app_users" and set current app as default i see no reason why you would need to know the users of another ap

Seconded by 9101060 08:54, 16 July 2007 (PDT): I would love this.

Seconded by 598852099 09:06, 9 August 2007 (PDT): AJAX style is the way to go.

Seconded by 558830634 21:32, 17 August 2007 (PDT): agree with previous comment: AJAX style is the way to go, to support long lists.

Ninthed by Travis Caruth 15:12, 5 October 2007 (PDT):i personally like the php way of doing things because my co-developer and myself use databases as frequently as possible (if it is sensible).

[edit] <fb:editor> tags

This tag needs a parameter such as "noform". There are cases where you want to use the beautiful formatting of the "editor", but if you're doing a mock-ajax, you need to put your own <form> tag before and after the editor. Can't have double-form tags. 10.8.254.7 15:54, 14 June 2007 (PDT)

  • I was having problems with a situation like this; however, I want to be able to submit the fb:editor normally but also have a mockajax link that can preview some of the data. The mock-ajax should submit the same information, but since I can't give the fb:editor form an id I can't use it in the clickrewriteform attribute. So another possibility could be that we be able to set the id of the form (formid?). 783530012 04:56, 27 June 2007 (PDT)
  • Current workaround includes making your fb:editor in the FBML Test Console and editing that HTML code output to include your mock-ajax call. Before any form is called you will also want to use: <span style="display:none"><fb:editor></fb:editor></span> Thanks to Skyler for that code. -- Chris Ridenour 1414620016 02:27, 08 July 2007 (EST)
  • I also would find this useful - I currently have the above workaround in place, and it's a bit of a pain. --42904324 11:59, 10 July 2007 (PDT)
  • I agree, seems almost ridiculous that you can't already do this.
  • I just use onsubmit and FBJS, works a treat. Luke 03:43, 25 October 2007 (PDT)

To expand a little more on that, I use the following code:

<div id="editor_div">
  <fb:editor>...</fb:editor>
</div>
.
.
.
<script><!--
  document.getElementById('editor_div').getFirstChild().addEventListener('submit', preview);

  function preview() {
    ...
    return false;
  }
// --!></script>

[edit] <fb:time> Add param

  • Instead of returning possibly time, or possibly a month date and time. Have a param to choose only time or full. For example I dont want the date only the time. like (6:30p)
  • How about <fb:strftime t="$epoch" format="%h:%M%p" />

10.8.254.6 02:23, 5 June 2007 (PDT)

10.8.254.7 03:36, 9 June 2007 (PDT)

10.8.254.6 13:48, 12 June 2007 (PDT)

James Wheare 10:38, 21 August 2007 (PDT)

706915354 14:55, 21 August 2007 (PDT)

--6014477 18:23, 30 December 2007 (PST)

--Michael Plasmeier 17:06, 28 August 2007 (PDT)

[edit] <fb:network-selector>

Like <fb:friend-selector>, but for the user's networks rather than friends.

713521376 11:05, 1 September 2007 (PDT) Seconded. Should have an optional "None" item meaning no network.

[edit] <fb:network-name>

Takes in a networks id and displays the name of that network. 761070248 15:10, 20 September 2007 (PDT)

[edit] New attribute in <fb:photo>

Seconded by Joe Hansche (29 July, 2007): If this is not implemented, an alternative would be to allow photo.php to take a PID that is returned by the API. As it is, the pid and aid attributes that are passed to photo.php are NOT the same as those returned by the API. The values on photo.php are short (5-10 digits, max), but the API returns very long numbers. Attempting to use that value in the pid value of the URL causes it to display a "Content not found" error. If you provide both the pid and id (uid) values, then it will ignore the pid value, and will instead search for all photos owned by the uid provided. This makes it impossible to link directly to a photo that is pulled via the API.

[edit] Mock AJAX Enhancements

Allow us to specify clickloadingid and clickloadingimage. The contents of the element specified by clickloadingid would be replaces with the image specified by clickloadingimage while the request is waiting to finish 10.8.254.7 03:36, 9 June 2007 (PDT) 10.8.254.6 13:48, 12 June 2007 (PDT)

[edit] Mock AJAX Enhancements

Mock AJAX triggering onSubmit of a form rather than just onClick of the submit button. People very often submit forms by hitting return - which just breaks things. Some browsers (eg. Safari) seem to trigger it anyway, but others (eg. IE) don't.

42804224 12:11, 24 August 2007 (PDT) Or an FBJS function that could be bound would be good. That way we can event-bind a mock-ajax request to anything.

[edit] Indented Text Container

Just a tag to do the proper indenting of canvas contents. Right now if a document's FBML is "hello world", the hello world is not padded at all (e.g. it touches the left hand line of the canvas). There's a standard padding that Facebook uses, it'd be nice if everyone didn't have to figure out what it was and add their own <div> tags with the right style.

558830634 22:56, 24 July 2007 (PDT) I want that too. I also wasted time trying to get the right indentation. (Another option would be: instead of an indented-text container, you just auto-indent that content for us. But of course that would mess up people who have already indented their content, and you'd have to make a few changes such as changing the left-padding of the style that gets applied to the fb:header tag, but it seems like it's worth it in the long run.)

  • I disagree with the second option of automatically adding margins to canvas pages since some application want to use the entire canvas --1669320062 09:44, 1 October 2007 (PDT)

[edit] <fb:board> enhancement, a 'profile-template' attribute

Allows developer to provide a templatized (like templatized actions) URL for the link associated with the User that made the post. I have an application where every user has an app-specific, user-specific 'profile' page, i.e. http://apps.facebook.com/example/profile?uid=123456. I would like to use the <fb:board> (or <fb:comments>, which I'm using already) but would prefer the posts that I'm displaying link to the user's app-specific profile. So, if the profile-template attribute was "http://apps.facebook.com/example/profile?uid={uid}", then any post for a user with uid 123 would render user links with hrefs of "http://apps.facebook.com/example/profile?uid=123". When providing a profile-template attribute, the profile-template attribute should be forced to contain a {uid} value, just like publish templatized action requires {actor}.

Navigation