Error Validating Verification Code Facebook Graph
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us oauth dialog request Learn more about Stack Overflow the company Business Learn more about hiring developers please make sure your redirect_uri is identical or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack facebook redirect_uri Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Always get “Error validating verification code.” when facebook developers requesting access_token up vote 0 down vote favorite Well, I have done all my best to try to solve this problem, but, still, it's too annoying. I decided to use OAuth with server-side authentication. So, I have followed Facebook documentation, and I have done the following step. Create a link which redirect people to log in Facebook by https://www.facebook.com/dialog/oauth?client_id={APP_ID}&redirect_uri=http://abc.com/nextStep.php In nextStep.php, redirect people to https://graph.facebook.com/oauth/access_token?code={CODE GENERATED BY
Facebook Apps
FACEBOOK}&client_id={APP_ID}&redirect_uri=http://abc.com/thirdStep.php&client_secret={APP_SECRET} The problem exists when proceeding to step 2. The page shows that: { "error": { "message": "Error validating verification code.", "type": "OAuthException", "code": 100 } } I have googled for lots of time. Some people suggests to add a trailing slash in the redirect_uri, but it doesn't work. What should I do? And how can I get the user information after getting the access_token? Thanks for your help. facebook oauth facebook-oauth share|improve this question asked Aug 4 '12 at 18:15 Chow Pak Hin 134 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote Two things: First, I’d say you’re missing the state parameter in your first URL … you have to make up a value that the docs describe as SOME_ARBITRARY_BUT_UNIQUE_STRING – some unique id/hash/whatever, that no one from the outside would be able to guess. (Yes, that parameter is optional – but you should use it anyway, because as the docs say it helps prevent CSRF and is therefore an important security measure. If you don’t know what CSRF means, please look it up.) And second, in your step two, you should not redirect the user’s client to that address, but
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign http://stackoverflow.com/questions/11810972/always-get-error-validating-verification-code-when-requesting-access-token up Facebook redirect url issue OAuthException up vote 15 down vote favorite 6 My app was working well for long time, but now I am getting the error from Facebook saying: Content: {"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}} https://www.facebook.com/dialog/oauth/?client_id=163840537126360&redirect_uri=http://mycloud.niranjan.com/facebook/callback//empty/?vTitle=Facebook&scope=email,sms,user_about_me,friends_about_me,user_activities,friends_activities,user_birthday,friends_birthday,user_education_history,friends_education_history,user_events,friends_events,user_likes,friends_likes,user_location,friends_location,user_photos,friends_photos,user_videos,friends_videos,user_relationships,friends_relationships,user_status,friends_status,user_checkins,friends_checkins,read_stream,publish_stream Can anyone suggest a solution for this one? http://stackoverflow.com/questions/16562602/facebook-redirect-url-issue-oauthexception facebook api facebook-graph-api oauth share|improve this question edited Aug 13 '15 at 2:25 Flimzy 15.8k54269 asked May 15 '13 at 10:26 Niranjan Sagar 2141411 can you provide here your currently using redirect_uri? –Newbie May 15 '13 at 10:30 facebook.com/dialog/oauth/… –Niranjan Sagar May 15 '13 at 11:04 2 plz make sure that what redirect_url you have set at Facebook app should be same what you sending as redirect_uri –Umesh Awasthi May 15 '13 at 12:06 I had met the same issue several times, without changing any code, and I fixed it by changing another different redirect_uri, maybe it's because Facebook's server changed some methods. –Samuel Jul 11 '13 at 9:30 I am facing the same issue. My app is unable to generate access token after authorization and ends up with this message "Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request" I was using urllib.urlencode(args) to build up request URL's –Avi Mehenwal Sep 22 '13 at 20:51 add a comment| 6 Answers 6 active oldest vo
Sign in Pricing Blog Support Search GitHub This repository https://github.com/freizl/hoauth2/issues/19 Watch 4 Star 50 Fork 27 freizl/hoauth2 Code Issues 6 Pull requests 1 Projects 0 Pulse Graphs New issue Facebook: Error validating verification code. #19 Closed pmlodawski opened this Issue Sep 3, 2013 · 4 comments Projects None yet Labels None yet Milestone error validating No milestone Assignees No one assigned 2 participants 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 error validating verification 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 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 commented Sep 4, 2013 It's both http://localhost facebookKey :: OAuth2 facebookKey = OAuth2 { oau