Note: If you already have an App that is registered for the domain you wish to track then you just need the AppID and can skip to the next section. We need to create an empty Facebook App because the Facebook API will only allow code on a domain to make requests regarding an App that is linked to that domain.
Press "Create New App" in the top right corner on the Facebook Developer page for Apps.
For "App Display Name" enter anything you want; I used "SocialAnalytics". You can leave the App Namespace blank. Check the box to agree to the FB Policies and on to the next page.
The next stage is pretty easy, just enter your domain in both the "App Domain" and "Website" sections.
Grab the App ID from the top of the page and save it ready for the next section.