Facebook, Forms, and ColdFusion
The more I work with Facebook the more I hate its quirks. Recently a coworker had to create a contest form that submitted to a ColdFusion script. For legal reasons the form's data is stored on a server that we have no access to. Alas Facebook and ColdFusion do not play well with each other. Facebook adds a variety of extra form fields that confuses ColdFusion. There are work arounds that can be implemented on the server, but since we didn't have access to the server we had to come up with another solution.
What we came up with was to use another server to strip away the Facebook data and use cURL to submit the rest of the data to ColdFusion. That presented another problem, the thank you page redirect. I used CURLINFO_EFFECTIVE_URL to redirect the user to the final thank you page. I thought I was done, but Facebook threw one more curve at me. Facebook sniffs the user agent string and serves different content base on that. All the server redirections lost that data, so I had to grab the user agent string and force it back in the final redirect. Of course all of this had to happen a couple of hours before the contest started.