guylabbe.ca
guylabbe.ca

Reputation: 881

Facebook Page Tab : Error 191 (The specified URL is not owned by the application) but URLs are set

For a contest page, I use Page Tab within a Facebook App, but I can't set a Share dialog without getting this error.

    window.fbAsyncInit = function() 
    {
        FB.init({ appId: '##### (correctly set)', 
        status: true, 
       cookie: true,
        xfbml: true,
    oauth: true});
        FB.Canvas.setAutoGrow(); 
    }
    window.fbAsyncInit = function()
    {
        FB.ui({
          method: 'feed',
          name:'name',
          link:'https://expertsmo.ca/_fb/concours/1', // https://apps.facebook.com/expertsmo
          caption:'test'
         });
    }

Here is the App conf

I checked many posts on this error code, most of these problems are caused by the URL not being set; in my case, URL is well set and I still get this error. I tried many many things, still not working ( this solution of a similar case doesn't seem to work because I can't find the field "Website With Facebook Login").

I also use PHP sdk to find out if the user likes the page already, or not.

Really, I can't find the solution to this problem ... any idea? Thanks...

Upvotes: 0

Views: 520

Answers (1)

andyrandy
andyrandy

Reputation: 73984

You include the JavaScript SDK two times in the code, only one time with an App ID (that is different from the FB.init call). Make sure you are using the latest code from the Facebook docs and clean up old stuff. That error message comes up when the App ID is not correct, the settings should be fine.

https://developers.facebook.com/docs/javascript/quickstart/v2.0

You also use window.fbAsyncInit in a wrong way, this should only be used once when you open the page. FB.ui should get called on user interaction or you will also get problems with popup blockers.

Btw, you should put ALL JavaScript code right before the closing body tag (for many reasons). Not sure why you put the async function after the opening body tag.

Upvotes: 1

Related Questions