Authentification failed! Facebook returned an invalide user id., HybridAuth / PHP Facebook SDK authentication failed (getUser returns 0), CurlException: 60: SSL certificate problem

http://jumnuoy.blogspot.com/2012/12/authentification-failed-facebook_26.html
I'm trying to configure HybridAuth and I'm in the very early stages. Right now all I want to do is connect and make sure HA will redirect to facebook and prompt for app installation, then authenticate the user when they get back.


to solve this problem by altering the base_facebook.php class in the PHP SDK and adding the curlopt to ignore the SSL verification step. See below:


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

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

I'm trying to configure HybridAuth and I'm in the very early stages. Right now all I want to do is connect and make sure HA will redirect to facebook and prompt for app installation, then authenticate the user when they get back.


to solve this problem by altering the base_facebook.php class in the PHP SDK and adding the curlopt to ignore the SSL verification step. See below:


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

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

0 comments:

Post a Comment

Followers

រឿង ដែលខានមើលមិនបាន

Contact us

Name

Email *

Message *

Your Language

Online

Copyright 2009 Simplex Celebs All rights reserved Designed by www.sruol9.com