错误消息:redirect_uri 不属于应用程序
::更新::链接不再存在!
确实很奇怪,这绝对是一个错误!我用另一个应用程序的 app_id 进行了测试,它有效。 亲自查看:
https://apps.megalopes.com/megabraziltv/test.php (app_id 正确)
https://apps.megalopes.com/megabraziltv/test2.php(来自另一个应用程序的app_id)
---/---
我发现几个人有同样的问题和所有答案相等: 站点 URL 与 REQUEST_URI(重定向 URL)不同
我的应用程序设置是:
安全页面选项卡 URL:apps.megalopes.com/megabraziltv/...
应用程序域:megalopes.com
代码:
<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>
这个简单的代码不会重定向到任何其他 url 。我在js控制台上进行了测试,得到了相同的结果。有时有效,有时我会收到此错误消息:
API 错误代码:191 API 错误描述:指定的 URL 不是 归应用程序所有 错误消息:redirect_uri 不归应用程序所有 应用程序。
::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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我想我以前也遇到过类似的事情。
在应用程序的摘要页面中,确保填充安全画布 URL 和页面选项卡 URL。
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.
我的 redirect_uri 中的 URL 应该以“http://”开头。它缺少协议信息,从而导致 Facebook 无法识别我的网站并抛出这个恼人的 191 错误。一小时后我终于发现我仍然留下了头发。
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.
您必须创建一个频道页面,该页面允许“在某些浏览器中进行跨域通信”
这是您服务器上的一个html页面(即/channel.html),仅包含:
并使 Javascript SDK 意识到这一点:
更多信息:
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 :
And make the Javascript SDK aware of it :
More about this :
这是因为您在 facebook 错误中提到的域名 URL。域名 URL 不会像 www.site.com
更新您的域名网址,例如 subdomain.site.com。
现在它肯定有效。
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.
无论是页面选项卡还是画布,您都必须在 https://developers.facebook.com/apps 中识别网站 URL
我如何修复:
应用程序域:megalopes.com(域)
站点 URL:/安全画布 URL:/安全页面选项卡 URL:https://www.megalopes.com(子域)
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)