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

Embedding Flash Video

Problem

I’ve encoded some great video as FLV files and now I need to embed this in my FBML.

Solution

Use the fb:flv tag to embed Flash Video (FLV) files. The simplest form is:

<fb:flv src="http://someserver.com/greatEncodedVideo.flv" />

The player fits right into the Facebook look and feel, as shown in Figure 6-9.

Facebook Flash Video player

Figure 6-9. Facebook Flash Video player

Discussion

The fb:flv tag really is just that: a tag that plays FLV files. This is not a generic video player, meaning it won’t handle anything but FLV files, so don’t throw it .mov, .wmv, or .avi files and hope they’ll work. The three optional parameters let you set the width and height (which you should do if you can because some reports indicate that Internet Explorer will collapse your video down to a single gray dot if you don’t), and a title, which will be passed into the video as the Flash variable video_title.

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