Here Mudassar Ahmed Khan has explained in a short tutorial, how to create and configure App FaceBook App and Facebook Application Id ( AppId ) and Secret Key to use it in your Web Applications. He has also explained why the following errors are thrown by FaceBook and how to resolve them.
1. Error validating application. Invalid application ID
2. Invalid redirect_uri: Given URL is not allowed by the Application configuration.