Embed a Vimeo video as FBML

Posted on 07. Mar, 2011 in Personal

I spent a while earlier today trying to embed some Vimeo videos in a FBML box on COMMON’s Facebook page and it was kind of  a pain. Facebook doesn’t like Vimeo’s new iframe-based player, and you have to specify a thumbnail image for an embedded flash object. So in case anyone else is trying to do the same thing, I made a little form that lets you set some options and gets a thumbnail image through Vimeo’s API. It’s not pretty but it gets the job done.

Select embed options

Vimeo ID: Required

Text Color: Do not include '#'

Embed Width: Do not include 'px'

Embed Height: Do not include 'px'

Show Title: Yes No

Show Byline: Yes No

Show Portrait: Yes No

Allow Fullscreen: Yes No

Loop Playback: Yes No

Got a question?

Is this the best, most up-to-date mehod to embed videos on Facebook?
Good question. Facebook says that they're deprecating FBML but I couldn't find any better way.

But does it work?
As of today, yes.

Are you planning to maintain this in case Facebook and/or Vimeo change their APIs?
Not unless something of mine breaks.

Can I contact you for support?
You can leave a comment below and I'll help if I can.

Anything else?
It works best if your width and height maintain the aspect ratio of the original video. Otherwise the thumbnail image gets distorted. Also, Facebook might override some of your selections, like fullscreen.

How do I use it?
Just enter the ID of the Vimeo video you're trying to embed. Then feel free to change any of the defaults for the other values.