javascriptphphtmlfacebook

Facebook login: Please make sure your redirect_uri is identical to the one you used in the OAuth dialog


So I'm out of ideas, I don't know what to check or debug anymore, but on the exception I get this:

string(188203) "Facebook\FacebookAuthorizationException Object
(
    [statusCode:Facebook\FacebookRequestException:private] => 400
    [rawResponse:Facebook\FacebookRequestException:private] => {"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,"fbtrace_id":"DqCCKoiN0r4"}}
    [responseData:Facebook\FacebookRequestException:private] => Array
        (
            [error] => Array
                (
                    [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
                    [fbtrace_id] => DqCCKoiN0r4
                )

        )

    [message:protected] => Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog request
    [string:Exception:private] => 
    [code:protected] => 100

Solution

  • I believed you have used different redirect_uri in your facebook app settings and Oauth API code. thats why you got this error.

    For facebook login you must set same redirect_uri into both place.