No matter how simple or complicated is your Facebook application, the first your need to do is "Register your Facebook Application in Facebook" and it is free-of-charge.

 

Registering Your Facebook Application

To register your Facebook application, simply do the followings:

 

Configuring Your Facebook Application

Note: Recently (in Aug2010), Facebook had changed the layout and field names for the Application Settings page. The following screen shots had been updated to reflect the changes.

If you are building an Facebook canvas application, then simply ignore this page and leave the "Site URL" blank for the moment.

 

That is what you need to do in setting up your Facebook Application, at least for those primitive applications.

 

Note: Facebook had recently changed the application settings screen layout and some of the field names. For details, please refer to the following 2 FAQs: