错误消息:redirect_uri 不属于应用程序

发布于 2024-12-05 12:30:52 字数 1176 浏览 2 评论 0原文

::更新::链接不再存在!

确实很奇怪,这绝对是一个错误!我用另一个应用程序的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

你曾走过我的故事 2024-12-12 12:30:53

我想我以前也遇到过类似的事情。

在应用程序的摘要页面中,确保填充安全画布 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.

隐诗 2024-12-12 12:30:53

我的 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.

苍风燃霜 2024-12-12 12:30:53

您必须创建一个频道页面,该页面允许“在某些浏览器中进行跨域通信”

这是您服务器上的一个html页面(即/channel.html),仅包含:

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

并使 Javascript SDK 意识到这一点:

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

更多信息:

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 :

醉生梦死 2024-12-12 12:30:53

这是因为您在 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.

假装不在乎 2024-12-12 12:30:52

无论是页面选项卡还是画布,您都必须在 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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文