Error Message: redirect_uri is not owned by the ap

2019-04-11 16:57发布

::UPDATE:: LINKS DO NOT EXIST ANYMORE!

Very strange indeed, this is definitely a bug! I did a test with app_id from another application and it worked. See for yourself:

https://apps.megalopes.com/megabraziltv/test.php (app_id correct)

https://apps.megalopes.com/megabraziltv/test2.php (app_id from another application)

---/---

I found several people with the same question and all the answers are equal: Site URL is not same as REQUEST_URI (Redirecting URL)

My app setting are:

Secure Page Tab URL: apps.megalopes.com/megabraziltv/...

App Domain: megalopes.com

code:

<div id="fb-root"></div>
      <script src="http://connect.facebook.net/pt_BR/all.js">
      </script>
      <script>
         FB.init({ 
            appId:'123456789', cookie:true, 
            status:true, xfbml:true 
         });

         FB.ui({ method: 'apprequests', 
            message: 'Here is a new Requests dialog...'});
      </script>

This simple code is not redirecting to any other url. I tested on the js console getting the same results. Sometimes works and sometimes I get this error message:

API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application.

5条回答
聊天终结者
2楼-- · 2019-04-11 16:57

Regardless of being page tab or canvas, you must identify the website Site URL in https://developers.facebook.com/apps

How I fixed:

App Domain: megalopes.com (domain)

Site URL: / Secure Canvas URL: / Secure Page Tab URL: https://www.megalopes.com (subdomain)

查看更多
贼婆χ
3楼-- · 2019-04-11 16:58

I think I have run into something similar before.

In the summary page of your app ensure both the Secure Canvas URL and Page Tab URL are populated.

查看更多
何必那么认真
4楼-- · 2019-04-11 17:01

You have to create a channel page, which allows "cross domain communication in certain browsers"

This is an html page (saying /channel.html) on your server, which only contains :

<script src="//connect.facebook.net/en_US/all.js"></script>

And make the Javascript SDK aware of it :

FB.init({
    appId: 'xxxxxx',
    cookie: true, 
    channelUrl: location.protocol + '//' + location.host + '/channel.html'
});

More about this :

查看更多
欢心
5楼-- · 2019-04-11 17:10

It's because of domain URL that you mentioned in facebook's mistake. Domain URL wont be like www.site.com
Update your domain url like subdomain.site.com.
Now it surely work.

查看更多
女痞
6楼-- · 2019-04-11 17:14

The URL in my redirect_uri should have "http://" in the beginning. It was missing the protocol information, thus leading Facebook not to recognize my website and throw this annoying 191 error. I finally found out after one hour pulling the hair I (still) have left.

查看更多
登录 后发表回答