加载facebook SDK时出现应用程序错误

加载facebook SDK时出现应用程序错误

问题描述:

我的网页上的代码:

<body class="popup">
    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        // init the FB JS SDK
        FB.init({
          appId      : '476947702378530',                    // App ID from the app dashboard
          channelUrl : '//www.majorforms.com/fb_channel.php?_lang_id=1',// Channel file for x-domain comms
          status     : true,                                 // Check Facebook Login status
          xfbml      : true                                  // Look for social plugins on the page
        });

        // Additional initialization code such as adding Event Listeners goes here
      };

      // Load the SDK asynchronously
      (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 = "//connect.facebook.net/en/all.js";
         fjs.parentNode.insertBefore(js, fjs);
       }(document, 'script', 'facebook-jssdk'));
    </script>

使用浏览器加载该页面后,我在Firebug控制台中收到此错误:

After loading that page with a browser, I get this error in firebug console:

 Application Error: There was a problem getting data for the application you requested. The application may not be valid, or there may be a temporary glitch. Please try again later.

我不太了解.我没有真正的应用程序,我只是使用了Facebook(公司)帐户的标识符.我不想创建一个新的Facebook应用程序,我只想使用特定Facebook帐户的凭据.我怎么做?

I don't really understand. I do not have a real app, I just used the identifier of a facebook (company) account. I do not want to create a new facebook app, I just want to use credentials of a specific facebook account. How do I do that?

我不是百分百确定,但是您需要创建一个使用facebook sdk的应用程序,因为在FB.init方法中,它显然要求使用Facebook应用程序ID.

I'm not hundred percent sure but you need to create an app to use the facebook sdk because in the FB.init method it obviously asks for the Facebook App Id.

创建Facebook应用程序并不一定意味着您实际上在Facebook上有一个应用程序,Facebook Developers页面上的应用程序配置屏幕上有一个专门的部分用于具有Facebook Login的网站",所以我认为这就是您应该采取的方式

Creating a Facebook App doesn't necessarily mean that you actually have an app on facebook, the app configuration screen on Facebook Developers page has a specific section for "Website With Facebook Login" , so I think thats the way you should go.