0

我正在尝试在我的 Web 应用程序中实现 facebook 登录。我得到了应用程序 ID,我的代码如下。`我的 Facebook 登录页面

  <div id="fb-root"></div>
  <script>
    window.fbAsyncInit = function() {
      FB.init({
        appId      : '<<App Id>> ', // App ID
        channelUrl : '//www. DOMAIN NAME.com/channel.html', // Channel File
        status     : true, // check login status
        cookie     : true, // enable cookies to allow the server to access the session
        xfbml      : true  // parse XFBML
      });
      // Additional initialization code here
    };
    // Load the SDK Asynchronously
    (function(d){
       var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
       if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       ref.parentNode.insertBefore(js, ref);
     }(document));
  </script><div class="fb-login-button"><a href=" ">Login with Facebook</a></div>
</body>

`。我正在尝试运行它并为我的应用程序提供错误。我也得到了密钥,但不知道确切的位置。我们是否需要为此放置任何 css 或 js 或任何其他文件?

任何帮助是极大的赞赏..

4

1 回答 1

0
appId      : '<<App Id>> ', //Place App ID
channelUrl : '//www. DOMAIN0 NAME.com/channel.html', // Place domain here
于 2012-06-27T12:05:32.190 回答