Facebook OAuth access_token return HTTP 400 Error Validating Verification Code
{
"error": {
"type": "OAuthException",
"message": "Error validating verification code."
}
}
I was following the guides at Facebook Developers to do OAuth on the server side. In summary:
- Redirect the user to https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL
- After user click allow, it’ll hit our Redirect Uri
- At that point we’ll get the code and we need to do a server side HTTP Get to the following Url to exchange the code with our oAuth access token:
https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&
client_secret=YOUR_APP_SECRET&code=THE_CODE_FROM_ABOVE
Now at step 3, I kept on getting Http 400 response back.
So after some research, I found out that on that redirect_uri that we submitted on step 3 doesn’t do anything but validate the request. Thus, the value need to match with step 2.
Finally! Phew.
About this entry
You’re currently reading “Facebook OAuth access_token return HTTP 400 Error Validating Verification Code,” an entry on Ronald Widha
- Published:
- 24.03.11 / 6pm
- Category:
- Articles

View Comments
Jump to comment form | comments rss [?] | trackback uri [?]