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
Creating a new FaceBook Application
First thing you need to click the Create New App button
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.
Then FaceBook will ask for you to fill the Captcha Image Text. Fill it and press Continue
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.
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.
Some Common Errors and their solutions
Error validating application. Invalid application ID
"message": "Error validating application. Invalid application ID.",
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.
"message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",
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.