Reputation: 547
I'm trying to use spring-boot-starter-social-facebook to connect to facebook and print my profile name, but i dont understand why it failed.
FacebookController.java
/connect/facebookConnect.html
then on developer.facebook.com, i configured my app like this . .
I also set the appid and appsecret in applicationProperties. then when i try to run and press 'connect', the browser loads for ~10secs and then in Spring Tool Suite's console it prints . . .
Exception while handling OAuth2 callback (I/O error on POST request for "https://graph.facebook.com/v2.3/oauth/access_token":Connection timed out: connect; nested exception is java.net.ConnectException: Connection timed out: connect). Redirecting to facebook connection status page.
i pasted the link in the browser and it says
{
"error": {
"message": "Missing redirect_uri parameter.",
"type": "OAuthException",
"code": 191,
"fbtrace_id": "ClbUIsKtnXt"
}
}
i think i messed up configuring testapp in facebook.
SiteURL = http://localhost:8080/
Valid Oauth redirect = http://localhost:8080/connect/facebook
what should i do? thank you in advance.
Upvotes: 1
Views: 1566
Reputation: 11
You should filled in Domains not localhost , like this
and you can configuration you System file hosts turn to 127.0.0.1 for local testing.
Upvotes: 0
Reputation: 11449
You need to give IP address instead of local host.
Following link you can find same information
Facebook app - login through omniauth - OAuthException 191
Upvotes: 0