Yes, it’s true, I’ve officially mastered the most under documented API in history.
We are currently using the FBML method of publishing our wonderful Lord of the Rings licensed game. All has been rosey in the garden of The One Ring, until we found out that the FBJS Flash bridge is the most unimpressive piece of script I have ever seen. We found that random errors would creep into the loading of the SWF because of this bridge, and decided that the only way around it was to bite the bullet and move to iframe mode.
However, what I didn’t recon on was the amazing lack of documentation and examples when it comes to working in iframe mode. The crux of any successful Facebook app lies in self-publication, encouraging the user to tell the world how he has gained a new level in growing tulips, or played his longest Scrabble word ever. We wanted to be able to do this from within the PHP (well HTML if your being a pedant), or within the SWF. Simples. You’d think so, but apparently not.
- You need to use the FB.Connect functions, even though your application is not technically a Facebook Connect app.
- You need to have an xd_receiver.htm file on your server in order to communicate with the JS API.
- You need to configure the callback URL on the “Connect” tab of the developer settings for your app.
- You can then use the following code to spawn a stream post box…
<CODE REMOVED, NOW OUT OF DATE! LEAVE A COMMENT IF NEW CODE WILL BE HANDY>
It’s a starting point at least, and as I’ve spend the last few days looking for just this example, I thought it might help someone down the line. This may not be the best way to achieve my goal, all comments would be received with thanks.
Also, you may well find FB.Connect.getStatus() handy, it was how I found out that my connect settings were wrong in the app settings page.