4

Code on my web page:

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

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.

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?

nagylzs
  • 3,954
  • 6
  • 39
  • 70
  • 1
    I also have this error using an fb app which is in test mode. All api calls do work though. – A.W. Sep 17 '17 at 08:30
  • I had this error while testing the `non-test version` of a Facebook application (in development mode though) with a `test user` which was created for a different Facebook application. My bad :) – turdus-merula Mar 12 '18 at 22:08

2 Answers2

3

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.

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.

Ozan Tabak
  • 662
  • 3
  • 9
  • 3
    it is 100% sure that you have to create a Facebook app – Luca Rocchi May 09 '13 at 11:49
  • 1
    Here is the thing: the documentation says that: "Start by visiting the App Dashboard. If you haven't created an application before you will be prompted to register." I was logged in with a company account. Very strange, that facebook allowed me to register as a developer. But then redirected back to normal facebook page, without giving any warning. So the solution seems to be: DO NOT REGISTER AS A DEVELOPER WITH A COMPANY ACCOUNT. This is not clear from the docs. – nagylzs May 09 '13 at 11:57
  • 3
    Check that your app is "live and available to all users" and not in development mode, otherwise you'll get this error. Go to https://developers.facebook.com/apps/ > open your app > App Review > "Make [Name] public?" > YES. – neave Aug 29 '16 at 18:37
2

I found I was getting this error when testing my application because I was signed into Facebook as a test account user. When I tried to access the live environment it would generate that error as it was already authenticated to the developer user. The error message is kind of generic and doesn't really spell out the issue in black and white.

Andrew Schultz
  • 4,092
  • 2
  • 21
  • 44