2

if we use facebook login in angularjs application.how to hide the credentials such as appid,secretkey etc in the below code

window.fbAsyncInit = function() {
  FB.init({
    appId: appId',
    cookie: true,xfbml: true,
    channelUrl: return_url,
    oauth: true
    });
  };
(function() {
  var e = document.createElement('script');
  e.async = true;e.src = document.location.protocol +'//connect.facebook.net/en_US/all.js';
  document.getElementById('fb-root').appendChild(e);}());
  },
  {scope:fbPermissions});
}

1 Answer 1

1

If you use angularJS and hence javascript, you are not asked in most cases to give your appKey.

Only AppID is accessible by end users. In most cases App Id can be taken from javascript sources. The only thing that you should be worry about is App Secret.

Not the answer you're looking for? Browse other questions tagged or ask your own question.