The fb:serverfbml tag is not rendering

Serious facebook developers would be familiar with this tag. It basically allows you to render fbml outside a fb canvas pages.  Now the frustrating bit.

While writing the invite page for my facebook app, I realize I could not render any fbml when the page is in an iframe. If I set the Render Method to canvas it works fine, so the problem wasn’t with the fbml itself. The xd_receiver was also referenced correctly. After a morning of testing I decided to ask Alvin for some of his old code, and it turned out to be exactly the same, which was puzzling since it definitely worked before.

Another few hours of fruitless searching finally led me to a post which provided a simple solution: set the¬†Connect URL to the same url as your Canvas Callback URL. Appears that this requirement was put in place after an update from facebook. They automatically patched the settings in older apps that used xd_receiver so older apps would continue to run properly, but not surprisingly they missed this out in the developers’ wiki.

Since I was developing a native FB app I had skipped the fbConnect settings entirely, my bad. Now I’m posting this here (with hopefully more intuitive keywords) in case someone else is having the same problem.

ps. For general news and updates for the api remember to check http://developers.facebook.com/news.php?tab=updates often.

One thought on “The fb:serverfbml tag is not rendering

Leave a Reply

Your email address will not be published. Required fields are marked *