Is it safe to have facebook App ID embedded in the UI javascript code?

后端 未结 2 615
刺人心
刺人心 2021-02-19 06:54

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\'

2条回答
  •  独厮守ぢ
    2021-02-19 07:11

    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.

提交回复
热议问题