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?
OAuthException: If you receive an OAuthException error, it means that Edgar doesn't have the correct permissions to access your Facebook accounts right now. The password may have been changed on Facebook or Facebook may have reset your security session.
In your app settings on https://developers.facebook.com/sa/apps/<my-app-id> , make sure that you add the Facebook Login product. Then under "Client OAuth Settings" enter the URL in the "Valid OAuth redirect URIs" box.
1. Log in to the Facebook for Developers center, and proceed to My Apps / Facebook Login (steps 1-3 above). 2. In the Valid OAuth redirect URIs field, type the redirect URI for your website and then press ENTER.
I realize this is 6 weeks late, but I figured I'll post this here since I found a fix that worked for us. Had the same issue and after trying to encode the return url (which did not work), I realized that we were building our URL like:
$url = "http://example.com/"; $redirect_script = "/cgi-bin/redirect.cgi"; $redirect_url = $url . $redirect_script;
However this resulted in a return URL that looked like http://example.com//cgi-bin/redirect.cgi
-- note the "//" after example.com. When I removed the double-slashes from this URL, it worked again. OP, I see that your redirect URL has the same thing in /facebook/callback//empty?etc
which I believe is what's messing it up.
In my case I was using http://127.0.0.1:8000
- However FB changes that automatically to http://127.0.0.1:8000/
in the OAuth redirect to deal wihh passing query params. Changing my URL in my code to have an end slash solved the issue for me. I suspect they are storing the final useable version and comparing that to the 2nd request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With