Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hitting FB.init returns error "Polyfill JSON does not have implementation of stringify"

Yesterday, I did not have this issue. I don't believe any of my code has changed in any way since then. I get "Polyfill JSON does not have implementation of stringify". Line 46 of FBLogin.js is the FB.init.

here be thy error

window.fbAsyncInit = function() {
    FB.init({
        appId      : '##########',  //this is replaced with my appId
        cookie     : true,  
        xfbml      : true,  
        version    : 'v2.5' 
    });
};

(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_US/sdk.js"; //sdk.js
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
like image 847
mattstache Avatar asked Oct 06 '17 19:10

mattstache


1 Answers

It's an issue with Facebook's sdk when using Require.js: https://developers.facebook.com/bugs/173784386505038/

They should deploy a fix soon.

UPDATE: The issue is now fixed. Any remaining glitches should clear up shortly.

like image 59
lyosef Avatar answered Nov 11 '22 02:11

lyosef