Flash to Facebook bridge

November 19, 2008

I recently got working a Flash to Facebook bridge. I downloaded the as3 classes and example files from Zerofractal.com.

I spent a good couple of hours setting up my code and finding it not working. 

So back to square one, I loaded ZF’s example code and it worked. So I knew the issue remained with my setup

I first tested the calls with my barebones swf placed in an FB:iframe.

It worked!

So next  I started adding the flashvars I was trying to pass into the swf inside the frame.

It still worked !

next I added back the POST variables I was passing from the main page into the iframe.

BROKEN !!

It turns out I was not url-encoding my POST vars.

Lesson learned : urlencode() my vars !..   and of course the JS code and such did not alert me to any problems, it just didn’t work.