Redirecting to authentication dialog - “An error occurred. Please try again later”

前端 未结 30 1746
执念已碎
执念已碎 2020-11-29 04:08

Why does it always happen to me?

This happens after my application verify for user user login and redirect user to the authentication page:

https://w

相关标签:
30条回答
  • 2020-11-29 04:32

    The reason in my case was completely different. I was trying to open a Feed dialog automatically after page load. And 9 times of 10 it displayed this error. First, I added show_error: true parameter as suggested by @Peter Roome, but it didn't help, displaying 104: Invalid signature, not descriptive at all.

    Then I figured out the reason. The code was in $(document).ready jQuery function. And it seems that some facebook stuff had not yet been loaded at the point the code was to be executed. I moved the code to $(window).load block (which is executed after all page content is loaded), and the problem has been solved.

    0 讨论(0)
  • 2020-11-29 04:34

    Another possible mistake, if you directly copied the code from Facebook SDK example then you may get the same error despite of having everything correct. http://developers.facebook.com/docs/reference/php/

    This is because in their example they have used backquotes instead of single quotes for the key of the array. The correct code is as follows.

    require_once("facebook.php");
    
    $config = array();
    $config['appId'] = 'YOUR_APP_ID';
    $config['secret'] = 'YOUR_APP_SECRET';
    $config['fileUpload'] = false; // optional
    
    $facebook = new Facebook($config);
    
    0 讨论(0)
  • 2020-11-29 04:36

    I had this error because I was using redirect_url as a parameter instead of redirect_uri.

    The Server-Side Authentication doc page says to use redirect_url:

    https://www.facebook.com/dialog/oauth?
        client_id=YOUR_APP_ID
       &redirect_url=YOUR_REDIRECT_URI
       &scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES
       &state=SOME_ARBITRARY_BUT_UNIQUE_STRING
    

    But this is incorrect. The OAuth Dialog doc says to use redirect_uri instead, which works, so I'm assuming that you can only use one and not the other:

    https://www.facebook.com/dialog/oauth/?
        client_id=YOUR_APP_ID
        &redirect_uri=YOUR_REDIRECT_URL
        &state=YOUR_STATE_VALUE
        &scope=COMMA_SEPARATED_LIST_OF_PERMISSION_NAMES
    
    0 讨论(0)
  • 2020-11-29 04:37

    I was getting this error because I was starting from http://mysite.com, but had specified http://WWW.mysite.com in my Facebook settings - the www mattered... I ended up solving by using .httpaccess to always kill the "www", and pointing FB to http://mysite.com

    worst. subdomain. ever. :u)

    0 讨论(0)
  • 2020-11-29 04:37

    I had the same problem, and fix it by adding param &display=touch to url

    try, it may helps

    0 讨论(0)
  • 2020-11-29 04:38

    This was happening to me also but all the api keys, secrets and stuff were correct. What I found is that my app was running in sandbox mode. Go to your app settings in https://developers.facebook.com/ click the advanced settings tab and check to see if your app is in sandbox mode. If it is disable it and try again. Let us know if it works.

    0 讨论(0)
提交回复
热议问题