Facebook\'s documentation says that we can initialise FB in our app by running the following code. The code is from the documentation but this also expects \'appId\'
It is secure to embed appId in client side JS code, why because appId doesn't convey any information about your app/FB profile to anyone who doesn't know your FB username and password. Look at the url https://developers.facebook.com/apps/{your-app-id}/, If you insert your appid and paste the url in the browser, it will redirect to the FB login page. But do not include App_secret in your application. Check the Link for more information.