skip to Main Content

As of today an application that i have keeps getting the following error while using Facebook Login Api.

Error validating verification code. Please make sure your redirect_uri is identical to the one you used in the OAuth dialog
request

Last successfull attempt was yesterday night 2018-08-29 23:40:00 and since then all loging attempts end up to redirect_url mismatch.

My call back url is like

https://mysubdomain.mysite.gr/index.php?r=site/callbackfb

also tried alternative

https://mysubdomain.mysite.gr/index.php/site/callbackfb

but still no success.
No change was made to the application and nothing seems to justify the exception. Tried also with latest sdk librady, but i still get the same error.

Any help would be much appreciated.

4

Answers


  1. Chosen as BEST ANSWER

    Facebook seems to have "short of" break its own code. By enabling enfore https, the Validate OAuth url no longer validates.

    I have added the following param on my redirect url to bypass the issue

    https://mysubdomain.mysite.gr/index.php?r=site/callbackfb&enforce_https=1


  2. i am facing same issue today here is solution please check below link :.

    Facebook PHP SDK – Login helper returns error

    I’m currently working on Graph api version v2.2

    If you open Enforce HTTPS on in Facebook Login settings.

    Go to you facebook-php-sdk and inside that

    FacebookHelpersFacebookRedirectLoginHelper.php
    

    change $redirectUrl:

    $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state','code']);
    

    To

    $redirectUrl = FacebookUrlManipulator::removeParamsFromUrl($redirectUrl, ['state','code','enforce_https']);
    
    Login or Signup to reply.
  3. It is a bug from Facebook that started today.

    Go to Facebook Developers.
    Choose your app.
    Go to Facebook Login > Settings
    Then uncheck ENFORCE HTTPS

    It worked for me 🙂

    Login or Signup to reply.
  4. Log into developers.facebook.com and make sure you’re using the redirect_uri set on your app.

    Failing that, as absurd as this sounds, verify you’re using the correct app_secret.

    Facebook will give you this instead of just saying “invalid secret” in the response

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search