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

Media Headers

Problem

I want to display a bunch of media that all belong to a user, so I’d like some way of showing that.

Solution

Use the fb:mediaheader tag along with its children, fb:header-title and fb:owner-action:

<fb:mediaheader uid="561415460">
    <fb:header-title>Jay's Photos</fb:header-title>
    <fb:owner-action href="http://facebook.com/photos">Facebook</fb:owner-action>
    <fb:owner-action href="http://flickr.com">Flickr</fb:owner-action>
</fb:mediaheader>

which will give you Figure 6-31.

fb:mediaheader as viewed by the owner

Figure 6-31. fb:mediaheader as viewed by the owner

Note that I will see the Facebook and Flickr links in this image (because they’re owner-actions), but other people will see a standard set of links relating to me (Send a Message, Poke, etc.), depending on privacy settings.

Discussion

Unlike tags such as fb:help (in fb:dashboard), the href in the fb:owner-action tag doesn’t have to be a Canvas page URL.

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