我正在尝试将 facebook 登录与我的网站集成。这是我的部分代码:
public void socialConnect() throws Exception {
Properties props = System.getProperties();
props.put("graph.facebook.com.consumer_key", "561379830565954");
props.put("graph.facebook.com.consumer_secret", "883e8d729d0358b4040fbffa762d832d");
props.put("graph.facebook.com.custom_permissions", "publish_stream,email,user_birthday,user_location,offline_access");
SocialAuthConfig config = SocialAuthConfig.getDefault();
config.load(props);
manager = new SocialAuthManager();
manager.setSocialAuthConfig(config);
ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
String successURL = externalContext.getRequestContextPath() + "/socialLoginSuccess.xhtml";
String authenticationURL = manager.getAuthenticationUrl(providerID, successURL);
FacesContext.getCurrentInstance().getExternalContext().redirect(authenticationURL);
}
我收到以下错误:
{
"error": {
"message": "redirect_uri isn't an absolute URI. Check RFC 3986.",
"type": "OAuthException",
"code": 191
}
}
redirectct_uri 应该是什么?我该如何解决它有人可以帮忙吗?
谢谢