facebook->getUser() returning 0

前端 未结 5 1529
天涯浪人
天涯浪人 2021-01-16 04:36

Whenever I try to login a prompt opens asking for the basic permissions, after that its being redirected to my redirect_uri with an URL

=\">http://loc

5条回答
  •  我在风中等你
    2021-01-16 04:50

    If User is logged in and still getting $user = 0 I faced this issue on different occasions but SDK issue is not happening to everyone. So I'm not sure what goes wrong here. But I dig in to it little bit and found solution as mentioned below.

    SOLUTION : This worked for me after trying for many solutions for this issue.

    In base_facebook.php file, find the makeRequest() method and check for following Line.

    $opts = self::$CURL_OPTS; 
    

    Immediately following it, add this line

    $opts[CURLOPT_SSL_VERIFYPEER] = false;  
    

    More details can be found here - http://net.tutsplus.com/tutorials/php/how-to-authenticate-your-users-with-facebook-connect/

提交回复
热议问题