Fb登录使用扩展名

时间:2016-06-16 14:52:44

标签: fbloginview

当我的应用是Chrome扩展程序时,Fb登录中FB应用程序选项中的应用程序域应该是什么。 我试过chrome-extension:/ [id] 没有它,错误即将到来

Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.

这是我的logic.js

    window.fbAsyncInit = function() {
    FB.init({
      appId      : '1232048723506658',
      xfbml      : true,
      version    : 'v2.6'
    });
    FB.getLoginStatus(function(response) {

  if (response.status === 'connected') {
    console.log('Logged in.');
  }
  else {
    console.log('initiate FB login...');
    FB.login();
  }
});
    };  

  (function(d, s, id){
     var js, fjs = d.getElementsByTagName(s)[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement(s); js.id = id;
     js.src = "https://connect.facebook.net/en_US/sdk.js";
     fjs.parentNode.insertBefore(js, fjs);
   }(document, 'script', 'facebook-jssdk'));

请解释。

0 个答案:

没有答案
相关问题