Facebook-connect gives a redirect loop

后端 未结 2 2061
陌清茗
陌清茗 2021-01-03 03:34

Please, I need help. I\'m dealing with this issue for 1 month!!

I would like to implement facebook connect login to my website, using PHP and php-sdk 3.1.1. In few w

相关标签:
2条回答
  • 2021-01-03 04:08

    I had a similar issue with chrome browser, cookies always were incorrect or empty.

    Then I downloaded a facebook example from Heroku (it uses a popup window as login instead of a js redirect) and noticed that it doesn't work in chrome when the base URL of the website isn't the server root URL (ex: localhost/somedirectory/). But after creating a virtual host it looks like it works.

    You can see an example of the index.php from the application here https://gist.github.com/2845986

    0 讨论(0)
  • 2021-01-03 04:15

    I had this problem, in my case I had to edit base_facebook.php from the SDK:

    public static $CURL_OPTS = array(
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT        => 60,
        CURLOPT_USERAGENT      => 'facebook-php-3.2',
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_SSL_VERIFYHOST => false,
    );
    

    The last two options I added manually.

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