O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Profile Box Subtitles

Problem

I want to add one of those cool bars I see at the top of other Profile Boxes to mine so that I can give people more information about what’s in the box and some useful links to draw them into the app.

Solution

Luckily for you, subtitles aren’t just for foreign films anymore. Use the fb:subtitle tag to add a bar to the top of your Profile Boxes that contain more info. Note that this tag is usually used with the fb:title tag, which is included in the following examples. The simplest form is:

<fb:subtitle>
    Displaying 10 of 2587 naps
</fb:subtitle>

which will give you Figure 6-15.

Super Disco Naps subtitle

Figure 6-15. Super Disco Naps subtitle

Discussion

You can add a seeallurl parameter to the fb:subtitle tag, which will add a “See All” link to the right edge of your bar. For example, the following:

<fb:title>Super Disco Naps</fb:title>
<fb:subtitle seeallurl="http://apps.facebook.com/superdisconaps/all">
        Displaying 10 of 2587 naps
</fb:subtitle>

will give you Figure 6-16.

Super Disco Naps subtitle with “See All”

Figure 6-16. Super Disco Naps subtitle with “See All”

You can also add an fb:action tag within the fb:subtitle, which will add an action link next to the “See All” link (or in place of it if you don’t include a seeallurl parameter):

<fb:title>Super Disco Naps</fb:title> <fb:subtitle seeallurl="http://apps.facebook.com/superdisconaps/all"> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required