redirect_uri不是应用程序所有 [英] redirect_uri is not owned by the application

查看:136
本文介绍了redirect_uri不是应用程序所有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

类似的问题和答案没有解决我的问题。



我有两个Facebook应用程序。一个是另一个的测试版本,所以它们几乎相同。我没有考试的问题。但是在实时应用程序中,我正在获得redirect_uri不是应用程序所有的错误。



这个apprequest的一个例子。

  FB.ui(
{method:'apprequests',
message:'Greetings!你会成为我的邻居吗?'
数据:'invite_friends'
},
函数(响应){

});

我甚至在下一个片段中手动添加了redirect_uri。


$ b $



$ b消息:'问候!你会成为我的邻居吗?'
data :'invite_friends',
redirect_uri:location.protocol +'//'+ location.host + location.pathname
},
function(response){

});

无论哪种方式,我得到的redirect_uri不是由应用程序所有错误的代码在我的直播应用程序而不是我的测试应用程序。



在这两个应用程序中,设置遵循此模式。




  • 应用程式域名:subdomain.domain.com,domain.com

  • 网址:http://subdomain.domain.com/

  • 画布网址:http://subdomain.domain.com/Facebook/

  • 安全画布网址:https://subdomain.domain.com/Facebook/

  • 页面选项卡URL:http://subdomain.domain.com/Facebook/

  • 安全页选项卡URL:https://subdomain.domain.com/Facebook/



我们正在使用FB JS SDK。在这种情况下,redirect_uri应该由SDK提供,从我可以看到它使用 location.protocol +'//'+ location.host + location.pathname



所以,如果redirect_uri由SDK提供,我的设置是正确的,为什么它可以在一个应用程序中工作,而不是另一个?



请帮忙,我已经浪费了一天的时间。我确定这是一个愚蠢的事情,但是我无法为我的生活找到它。

解决方案

确定问题源于我们的应用程序代码中不正确的AppID。这可能是导致该应用程序被认定为我们公司生产的另一个应用程序,因此在redirect_uri中不匹配。


Similar questions and answers have not solved my problem.

I have two Facebook apps. One is a test version for the other so they are nearly identical. I am having no problems on test. But on the live app I am getting "redirect_uri is not owned by the application" errors.

A case in point this apprequest.

FB.ui(
    { method: 'apprequests',
        message: 'Greetings! Would you be my neighbor?',
        data: 'invite_friends'
    },
    function (response) {

    });

I even manually added redirect_uri in this next snippet.

FB.ui(
    { method: 'apprequests',
        message: 'Greetings! Would you be my neighbor?',
        data: 'invite_friends',
        redirect_uri: location.protocol + '//' + location.host + location.pathname
    },
    function (response) {

    });

Either way I get the "redirect_uri is not owned by the application" error with the code on my live app and not my testing app.

In both apps the settings follow this pattern.

  • App Domains: subdomain.domain.com , domain.com
  • Site URL: http ://subdomain.domain.com/
  • Canvas URL: http ://subdomain.domain.com/Facebook/
  • Secure Canvas URL : https ://subdomain.domain.com/Facebook/
  • Page Tab URL: http ://subdomain.domain.com/Facebook/
  • Secure Page Tab URL: https ://subdomain.domain.com/Facebook/

We are using the FB JS SDK. That being the case the redirect_uri should be supplied by the SDK and from what I can see it uses location.protocol + '//' + location.host + location.pathname.

So, if the redirect_uri is supplied by the SDK and my settings are correct why would it work in one app and not the other?

Please help this has wasted over a day of my time already. I'm sure it is something stupid but I can't find it for the life of me.

解决方案

Determined that the problem stemmed from an improperly set AppID within our app code. This presumably was causing the app to be recognized as another app our company produces and therefore the mismatch in redirect_uri.

这篇关于redirect_uri不是应用程序所有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆