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.

Get Facebook Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.