New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook: Error validating verification code. #19

Closed
pmlodawski opened this Issue Sep 3, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@pmlodawski

pmlodawski commented Sep 3, 2013

I'm not sure it is a bug in your code or rather in my facebook app configuration. When I run it I get an error:

➜  hoauth2 git:(master) ✗ ./example/Facebook/test 
"https://www.facebook.com/dialog/oauth?client_id=317076475103268&response_type=code&redirect_uri=http%3A%2F%2Flocalhost&scope=user_about_me%2Cemail"
visit the url and paste code here: 
__REMOVED__
test: StatusCodeException (Status {statusCode = 400, statusMessage = "Bad Request"}) [("Access-Control-Allow-Origin","*"),("Cache-Control","no-store"),("Content-Type","application/json"),("Expires","Sat, 01 Jan 2000 00:00:00 GMT"),("Pragma","no-cache"),("WWW-Authenticate","OAuth \"Facebook Platform\" \"invalid_code\" \"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request\""),("X-FB-Rev","924754"),("X-FB-Debug","__REMOVED__"),("Date","Tue, 03 Sep 2013 08:37:37 GMT"),("Connection","keep-alive"),("Content-Length","190"),("X-Response-Body-Start","{\"error\":{\"message\":\"Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request\",\"type\":\"OAuthException\",\"code\":100}}")] (CJ {expose = []})

I have listed http://localhost in "Valid OAuth redirect URIs" in facebook app configuration

@freizl

This comment has been minimized.

Owner

freizl commented Sep 4, 2013

Looks like config problem.
Could you show the callback URI of your FB app configuration and the URI in the Keys.hs for FB?

@pmlodawski

This comment has been minimized.

pmlodawski commented Sep 4, 2013

It's both http://localhost

Facebook config

facebookKey :: OAuth2
facebookKey = OAuth2 { oauthClientId = "__REMOVED__"
                     , oauthClientSecret = "__REMOVED__"
                     , oauthCallback = Just "http://localhost"
                     , oauthOAuthorizeEndpoint = "https://www.facebook.com/dialog/oauth"
                     , oauthAccessTokenEndpoint = "https://graph.facebook.com/oauth/access_token"
                     }
@freizl

This comment has been minimized.

Owner

freizl commented Sep 4, 2013

Hmm..interesting. Let me find a chance to replay the issue.

@freizl

This comment has been minimized.

Owner

freizl commented Mar 25, 2015

closed as no further update and not able to replicate it.
re-open if you met it again.

@freizl freizl closed this Mar 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment