Solving issues with showFeedDialog in Facebook Applications

Facebook October 5th, 2009 @ 11:10

Damn, it’s annoying when you get stuck at a single point in development.

When continuing development of an Facebook Iframe application, I got stuck when trying to implement the showFeedDialog feature. For some reason, I couldn’t get the feed form dialog to show, even though I had configured the initialization properly and was using the correct methods and syntax.

I read through the extensive (and inconsistent thus confusing) Facebook developers’ documentation, but couldn’t really find anything to help me. I’ve probably tried all of the various ways to initialize the app and use the API by now, and also tried to use streamPublish instead.
Also, the return values from the API insinuated that the dialog should actually be displayed (returned true when invoking the method).

Back to basics

So I figured it’s best to go back to the basic levels and read through the Getting started docs. And there it was. In a screenshot of the application settings, I noticed that they’d specified the Connect URL and set it to the same as the canvas URL. That’s the one thing I’d missed!
I guess the problem was that I didn’t see this as a Connect application, as it’s running in an Iframe.
But anyway, setting the connect url solved the problem and the feed dialogs popped up as intended!

Confusing Wiki docs

The Facebook developers’ wiki is full of (useful) information, but it seems like it’s got lots of counter-information with different ways of using their implementation. It gets confusing quickly and is quite hard to troubleshoot. I hope they manage to sort it out some day…