This project is read-only.

QA, Dev, and Production servers, and the app name

Jan 18, 2008 at 6:03 PM
I'm writing my FB app for work, and I want QA to test it on the test server, not my dev box. Eventually, this will go to production, but we'll want to be able to continue developement and test updates and changes before they go live.

I'm guessing this would be a common scenario for all but the very simplest applications, even if you don't have a QA department. Who wants to test code on the live site?!

Because dev, production, and QA are all on different servers, it seems like the only way to hit them through facebook is to have different facebook applications set up for each scenario, with each pointing to a different callback URL. Of course each one has to have a different name: MyApp, MyAppDev, MyAppQA. Does anyone have other ideas about this that I've missed?

In order to set this up I want to rely exclusively on the web.config file for the application name, rather than putting it in the aspx file (as the example does,) or hardcoding it in the code-behind. So I'm doing this in my page base class, in the OnPreLoad method:

protected override void OnPreLoad(EventArgs e)
// If there's only one facebook application in web.config, use that by default
if (fbApplication.ApplicationName.Length == 0)
FacebookSection section = (FacebookSection)

if (section.Applications.Count != 1)
throw new InvalidOperationException("Unable to load the application name from configuration.");

fbApplication.ApplicationName = section.Applications[0].Name;

I don't think this is a bug or an issue, per se, but it would be nice if FacebookApplication would behave this way by default.