1

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

enter image description here

/connect/facebookConnect.html

enter image description here

then on developer.facebook.com, i configured my app like this . .

enter image description here

enter image description here

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.

tuty_fruity
  • 523
  • 1
  • 5
  • 18
  • You can find answer here http://stackoverflow.com/questions/9941031/facebook-app-login-through-omniauth-oauthexception-191 – vaquar khan Nov 12 '15 at 06:22

3 Answers3

2

Try add localhost to app domains - my setting:

enter image description here

sodik
  • 4,675
  • 2
  • 29
  • 47
0

You need to give IP address instead of local host.

Following link you can find same information

Facebook app - login through omniauth - OAuthException 191

Community
  • 1
  • 1
vaquar khan
  • 10,864
  • 5
  • 72
  • 96
0

You should filled in Domains not localhost , like this enter image description here

and you can configuration you System file hosts turn to 127.0.0.1 for local testing.

sadaf2605
  • 7,332
  • 8
  • 60
  • 103
GETYOU
  • 11
  • 3