Wednesday, August 31, 2011

Facebook + ColdFusion

Ok, been working on this off and on now for a few months.  I had an old FBML Facebook Application that I wanted to convert over to the Graph API since FBML is going to go away at some point.  I got stuck on a number of bugs and I wanted to pass along the solutions to each here.

#1. A very odd / old ColdFusion error message about a missing form variable --- This is a relic back to ColdFusion 3.1 which will disappear soon, however if you aren't thinking straight or are programming after mid-night this one might catch for a while.  Thanks to Ray Camden for a very useful blog post which helped me with a very simple solution to this problem.

#2. Finding and parsing the cookie which holds the keys to the OAuth castle.  Again I stumbled across a useful blog post which helped me over this hurdle. (look for Cookie.fbs_[your app id])

After getting through these two problems, the rest seems pretty straight forward and just requires a bunch of JSON parsing.

The Facebook Graph API Explorer is very helpful for putting together your requests and seeing what is going to be returned.

The Facebook API Docs are also useful.  It would be helpful if their were some ColdFusion examples in there, but it seems that Facebook favors PHP.

No comments:

Post a Comment