4

I am getting the following error using the Facebook JDK for Login, pretty sure this has only just started happening within the last 1 or 2 days, is anybody experiencing this aswell? Here is my JS code and then Error

FB.getLoginStatus(function(response) {
    if (response.authResponse) {
        //Fire Login Ajax
    } else {
        FB.login(function(response) {
            if (response.authResponse) {
                FB.api('/me', function(response) {
                    //Fire Login Ajax
                });
            }
        });
    }
});

Uncaught Error: No polyfill registered for object
q    all.js:24
FB.subclass.process    all.js:118
FB.provide._processElement.processor    all.js:82
FB.provide._processElement    all.js:82
FB.provide.parse    all.js:82
q    all.js:24
FB.provide.parse
David Brent
  • 115
  • 7
  • A site I work on started getting the same error last night. I'm trying to debug it at the moment... – Phil Booth May 09 '12 at 10:07
  • So looking at where the exception occurs, they populate an array with some typenames and later on try to dereference an element in the array using `.toLowerCase()`. This makes the key value `'object'` rather than `'Object'` so the element is not found and the exception is thrown. – Phil Booth May 09 '12 at 10:14
  • ...either they need to consistently call `toLowerCase()` when populating the array (some of the other keys are in lower case), or remove the `toLowerCase()` when accessing, not sure which. Either way, doesn't seem like a difficult fix, hopefully it gets sorted out soon. :) – Phil Booth May 09 '12 at 10:16
  • Looks like a bug ticket has already been created for this :) [link]http://developers.facebook.com/bugs/420667497951980 – David Brent May 09 '12 at 11:05

4 Answers4

1

This is a bug. It's reported at https://developers.intern.facebook.com/bugs/420667497951980, it's under investigation.

Please have a look at Facebook Actionscript API 'Facebook.Init()' call is suddenly returning null session object. Why?

Community
  • 1
  • 1
Alexcode
  • 1,598
  • 7
  • 15
0

Same thing happened to a site I have last night. I traced the problem to this line:

FB.XFBML.parse();

If I comment this line, no error occurs.

Taryn
  • 242,637
  • 56
  • 362
  • 405
palroj
  • 151
  • 1
  • 1
  • 8
0

It's a FB API problem.

JS SDK issues today at 7:42am Currently, the all.js file is throwing an exception on load. We are working on a fix now. For more information and updates, please subscribe to bug 420667497951980.

Always keep a eye to the FB developer page

Luca
  • 51
  • 3
0

This works if FQL fails

FB.api({
    method: 'fql.query',
     query: 'SELECT name, uid, pic_square FROM user WHERE uid=me()'
    },
   function(rows) {
      // Process here
    }
 )