You go to https://developers.facebook.com/apps and create a new app. The app Id will be visible once created.
The app id and app secret is what you will use on your website or webapp to connect to Facebook.
1. Facebook connect authentication. Firstly you’ve to setup a facebook application to get the application id.