facebookfacebook-graph-apifacebook-javascript-sdk

Facebook Web Login "Sorry, something went wrong."


For some reason my previously working Facebook Login stopped working. When I connect to Facebook through the code below, I get a popup window containing the following message:

Sorry, something went wrong. We're working on getting this fixed as soon as we can.

Go Back

In the console it said something about https, so I configured my localhost development server to use https.

After doing this, I still get the same popup message, but without the https warning in the console.

I'm thinking maybe some of my settings aren't configured properly, so I'll add a screenshot of those below.

Here's my JS code for connecting to Facebook.

/**
 * Add files retrieved with getScript to cache.
 */
$.ajaxSetup({ cache: true });

/**
 * Get Facebook Graph SDK.
 */
$.getScript('https://connect.facebook.net/en_US/sdk.js', function() {
    FB.init({
        appId: 'XXX',
        version: 'v3.2'
    });
});

/**
 * Social Connect with Custom Facebook Button.
 */
$('#facebook-connect-button').on('click', function(e) {
    e.preventDefault();

    FB.login( function(fbResponse) {

        console.log(fbReponse);

        if ( fbResponse.status === 'connected' ) {

            //... Do stuff

        }

    }, {scope: 'public_profile,email', return_scopes: true });

});

And here are my Facebook Login settings in the developer section:

enter image description here


Solution

  • Magically resolved itself after giving it half a day.