[英]JSF+Facebook Integration One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL
I have created a Facebook Application and details are given screen shot ! 我创建了一个Facebook应用程序,并提供了详细的屏幕截图!
But when i am clicking on JSF Button Login with Facebook I am getting below exception 但是,当我单击使用Facebook的“ JSF按钮登录”时,出现以下异常
Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. 应用程序配置不允许使用给定的URL 。:应用程序的设置不允许使用一个或多个给定的URL。 It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. 它必须与网站URL或Canvas URL匹配,或者域必须是该应用程序域之一的子域。
Here are code i am using for redirect 这是我用于重定向的代码
private void redirect(String url, HttpServletResponse response)
throws IOException {
String urlSessionID = response.encodeRedirectURL(url);
response.sendRedirect(urlSessionID);
}
I tried other solution provided in other question which i found in Stackoverflow but its not worked for me . 我尝试了在Stackoverflow中找到的其他问题中提供的其他解决方案,但对我不起作用。
if (requestUrl.indexOf("Login.xhtml") > 0) {
callback = requestUrl.replaceAll("Login.xhtml", "fblogin.xhtml");
} else if (requestUrl.indexOf("UserRegistration.xhtml") > 0) {
callback = requestUrl.replaceAll("UserRegistration.xhtml",
"fblogin.xhtml");
}
service = new ServiceBuilder().provider(FacebookApi.class)
.apiKey(apiKey).apiSecret(apiSecret).callback(callback)
.scope("email,offline_access").build();
I made changes in the application and it worked but only for the user who created application not for other user 我在应用程序中进行了更改,但它仅对创建应用程序的用户有效,不适用于其他用户
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.