2015-10-14 103 views
1

我试图使用春季启动启动社交Facebook连接到Facebook和打印我的个人资料名称,但我不明白为什么它失败。春季启动社交无法连接到Facebook通过本地主机

FacebookController.java

enter image description here

/connect/facebookConnect.html

enter image description here

然后developer.facebook.com,我配置我的应用程序是这样的。 。

enter image description here

enter image description here

我还设置在applicationProperties的应用标识和appsecret。 然后当我尝试运行并按'连接'时,浏览器加载〜10秒,然后在弹出的Spring Tool Suite控制台中加载 。 。 。

处理OAuth2回调(对“https://graph.facebook.com/v2.3/oauth/access_token”的POST请求的I/O错误:连接超时:连接;嵌套异常是java.net.ConnectException:连接超时:连接)。重定向到Facebook连接状态页面。

我粘贴在浏览器中的链接,它说

{ 
    "error": { 
     "message": "Missing redirect_uri parameter.", 
     "type": "OAuthException", 
     "code": 191, 
     "fbtrace_id": "ClbUIsKtnXt" 
    } 
} 

我想我搞砸了Facebook配置testapp。

SITEURL = http://localhost:8080/

有效的OAuth重定向= http://localhost:8080/connect/facebook

我应该怎么办? 预先感谢您。

+0

你可以找到答案这里http://stackoverflow.com/questions/9941031/facebook-app-login-through-omniauth-oauthexception -191 –

回答

0

你应该填写不是localhost,这样 enter image description here

,你可以配置你系统文件主机转127.0.0.1进行本地测试。

2

尝试添加本地主机应用程序域 - 我的设置:

enter image description here

相关问题