fb:editor FBML tag in Facebook applications

(Facebook) · Русский (15,300 views)

Some time ago I have started posting about Facebook Application Platform (see my posts about setFBML and Facebook libraries for .NET). Today’s topic is fb:editor. As you may see, Facebook has nice look and feel, and all applications usually adapted in some way to its interface. fb:editor FBML tag allows you to create forms which looks just like native ones, but it has great limitation: it generates it’s own form tag, so can’t be used within ASP.NET server form. In this short post I’ll show HTML generated by fb:editor and a way how to use it in your ASP.NET application.

Here is example from fb:editor documentation:

fb:editor

First we need to include fb:editor tag to the page to force loading of CSS files:

1
<div style="display:none"><fb:editor /></div>

Now we should define basic structure of the form:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<table class="editorkit" border="0" cellspacing="0" style="width:400px">
    <tr class="width_setter">
        <th style="width:50px"></th>
        <td></td>
    </tr>
    <tr>
        <th class="detached_label">
            <label for="login">Login:<br><small>(required)</small></label>
        </th>
        <td class="editorkit_row">
            <input name="login" id="login" />
        </td>
        <td class="right_padding"></td>
    </tr>
    <tr>
        <th></th>
        <td class="editorkit_buttonset">
            <input type="submit" class="editorkit_button action" value="Submit" />
        </td>
        <td class="right_padding"></td>
    </tr>
</table>

BTW, we have several enhancements in the original layout: we have specified for attribute for the label tag (now if you would click to the label, corresponding input would be selected), and added ability to mark required fields with required text (it’s impossible with fb:editor).

14 Responses to this entry

Subscribe to comments with RSS

Facebook » fb:editor FBML tag in Facebook applications
said on 2008-01-16 at 10.03 pm · Permalink

[...] Dmytro Shteflyuk’s Home wrote an interesting post today on fb:editor FBML tag in Facebook applicationsHere’s a quick excerpt Some time ago I have started posting about Facebook Application Platform (see my posts about setFBML and Facebook libraries for .NET). Today’s topic is fb:editor. As you may see, Facebook has nice look and feel, and all applications usually adapted in some way to its interface. fb:editor FBML tag allows you to create forms which looks just like native ones, but it has great limitation: it generates it’s own form tag, so can’t be used within ASP.NET server form. In this short post I’ll show HTML [...]

said on 2008-01-16 at 10.36 pm · Permalink

Здорово!
на дворе 21 век, а в мы все еще используем таблицы для разметки!

ЗЫ

1
Fatal error: Call to undefined function curl_init() in /var/www/kpumuk/kpumuk.info/wp-content/plugins/openid/openid-classes.php on line 229
said on 2008-01-17 at 10.02 am · Permalink

Ага, меня это тоже поразило. Но фейсбуковцев это, видимо, не сильно напрягает.

Kigorw @
said on 2008-01-21 at 12.46 pm · Permalink

почему их это должно напрягать?

said on 2008-01-25 at 5.12 am · Permalink

Kigorw
ну видимо потому, что есть способы куда эффективнее :)

Saito @
said on 2008-03-07 at 12.17 am · Permalink

Button and Profile Box Question! Please help!!!

How do I create a button on my canvas page that when clicked shows/sends the ‘ imgsrc=’http://img.youtube.com/2.jpg’ width=’340′ height=’270′ />

said on 2008-03-31 at 11.42 pm · Permalink

Дарофте,,
help!!
вопрос токого плана:
мне нуна чтобы моя апликация отображалось с лева в списке Applications.
каким пораметром управляется изменение в списке(с лево)?,
зарание благодарен…

said on 2008-04-01 at 12.58 am · Permalink

уточнение,
при добовление моей апликации другим пользователем,
название(и ссылка) должна появится в левой понельке пользователя,,
help plizz,

Anonymous
said on 2008-04-07 at 3.45 pm · Permalink

Так невозможно сделать

said on 2008-04-25 at 12.25 pm · Permalink

Все получилось, правда пришлось попотеть, Спасибо большое.

to Anonymous, не говорите если не знаете, вы наверное даже не пробовали, у меня все получилось!

hash
said on 2008-06-29 at 1.13 pm · Permalink

Aшветия

Вопрос о разметке истинно спорный, если отлично используется в редакторе то уж простите, я тоже за использование таблиц в таком случае, тем более это не случай когда не надо использовать таблицы.

T-Rex @
said on 2008-08-23 at 9.59 pm · Permalink

Долго… Говорю, что-то не пишешь долго, я так в ремя от времени захожу поглазеть чего тут у тебя, а новых постов нету.. Мож случилось чего..? Ыть?
Чегой-то не наблюдил тут прямых контактов на сайте, решил написать каментом.
И чур я не бот :)
ЗЫ: и на RC тоже что-то не видно.. куда пропал?

Kigorw @
said on 2008-09-01 at 10.26 pm · Permalink

Поддерживаю Рекса, ты где пропал?

Adelf
said on 2008-09-30 at 11.46 am · Permalink

+1 к предыдущим двум товарищам. Хде автор? :)

Comments are closed

Comments for this entry are closed for a while. If you have anything to say – use a contact form. Thank you for your patience.