Ahmed
Ahmed

Reputation: 21

Getting error "Given URL is not allowed by the Application configuration." It was working 2-3 weeks back

Can someone please help me with this? This is happening on production environment too. :(

I have checked other threads here, but they didn't help.

Getting an error after facebook login dialog closes -

"Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

I'm trying this on localhost. It's not working on production environment either.

It was working on both localhost and production environments 2-3 weeks back.

I have cross-checked all the URLs on facebook app.

Details:

App Domains: localhost

Canvas URL:[http://localhost:8080/app/core/main/public/fb.jsp?fromFB=true]

Secure Canvas URL:[https://localhost:8443/app/core/main/public/fb.jsp?fromFB=true]

Site URL: [http://localhost:8080/app/core/main/] (tried with [http://localhost:8080] too, doesn't work)

Page Tab URL: [http://localhost:8080/app/core/main/public/fb.jsp?fromFB=true]

Secure Page Tab URL: [https://localhost:8443/app/core/main/public/fb.jsp?fromFB=true]

Have enabled "App on Facebook" under "App Center Listed Platforms".

Same configuration was working earlier. I'm using JSSDK -

FB.init({appId: 'XXXXXXXX',
                status: true, // check login status
                cookie: true, // enable cookies to allow the server to access the session
                xfbml: true  // parse XFBML
            });

FB.login(function(response) 
{
    if (response) 
    {
        if (response.status == 'connected') 
        {
            //showUserPages();
        } 
        else if ('unknown' == response.status && null != response.authResponse) 
        {
            loginIntoFB();
        }
    }
}, 
{ scope: 'manage_pages' });

Did facebook add any validations recently for the apps ?

Please let me know if i can provide any more information.

PS: Posting for the first time, please pardon me for any mistakes.

Upvotes: 1

Views: 385

Answers (1)

Ahmed
Ahmed

Reputation: 21

Issue was because of the local referenced facebook js sdk. Missed to notice that caching js sdk on local is against TOS. It is working after referring to updated facebook sdk - connect.facebook.net/en_US/all.js Thanks!

Upvotes: 1

Related Questions