In this article I will explain a step by step tutorial on how to create a Facebook application to get an AppID for your Website or Blog.
 
Visit FaceBook Developers Apps Section
First you need to visit FaceBook Developers section using the URL
Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
 
Creating a new FaceBook Application
First thing you need to click the Create New App button
Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
Once you click the Create New App button a FaceBook Dialog (as show below). You just need to give a unique name to the FaceBook App (You can leave rest fields untouched) and press Continue.
Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
                                  
Then FaceBook will ask for you to fill the Captcha Image Text. Fill it and press Continue
Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
 
Now the FaceBook App is ready to use. You can note down the App Id and App Secret as these will be required by your application.
Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
 
You will need to just configure on field i.e. Website with FaceBook Login. You need to click on it and fill up the TextBox with URL of your local application page that will use FaceBook API (as shown above)
Note: When you deploy your site to domain server then make sure you update Website with FaceBook Login with the new URL otherwise the App won’t work.
 
Create FaceBook App and Facebook Application Id ( AppId ) and Secret Key
 



Some Common Errors and their solutions
 
Error validating application. Invalid application ID
{
   "error": {
      "message": "Error validating application. Invalid application ID.",
      "type": "OAuthException",
      "code": 101
   }
}

This error means that you have set incorrect or invalid App Id. Hence you need to make sure you have specified correct App Id of a valid FaceBook App.
 
Invalid redirect_uri: Given URL is not allowed by the Application configuration.
{
   "error": {
      "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
      "type": "OAuthException",
      "code": 191
}
 
This error means that Website with FaceBook Login has URL that does not match with the URL of the page that’s making call to the FaceBook App. Hence you need to make sure that this field must always be set to the URL of the page that makes call to the FaceBook App.