Try importing the hybridauth files:
config/main.php
'import'=>array(
...
// for hybridauth
'application.modules.hybridauth.controllers.*',
...
),
Question
I'm using Yii framework and HybridAuth for social login action,i have google and yahoo works fine, but i can't make facebook and twitter to work.
Do i need an Https:// domain for that ? or is just some configuration to add ?
When i try to login using facebook or twitter i get this PHP Warning :
include(DefaultController.php) [function.include]: failed to open stream: No such file or directory
The error show up at vendors\yii_1.1.10\YiiBase.php(418):
{
407 foreach(self::$_includePaths as $path)
408 {
409 $classFile=$path.DIRECTORY_SEPARATOR.$className.'.php';
410 if(is_file($classFile))
411 {
412 include($classFile);
413 break;
414 }
415 }
416 }
417 else
418 include($className.'.php');
419 }
420 else // class name with namespace in PHP 5.3
421 {
422 $namespace=str_replace('\\','.',ltrim($className,'\\'));
423 if(($path=self::getPathOfAlias($namespace))!==false)
424 include($path.'.php');
425 else
426 return false;
427 }
428 return class_exists($className,false) || interface_exists($className,false);
429 }
430 return true;
Here is my main config file
'modules'=>array('admin',
'hybridauth' => array(
'baseUrl' => 'http://'. $_SERVER['SERVER_NAME'] . '/hybridauth',
'withYiiUser' => false, // Set to true if using yii-user
"providers" => array (
"yahoo" => array (
"enabled" => true
),
"google" => array (
"enabled" => true,
"keys" => array ( "id" => "[private]", "secret" => "[private]" ),
"scope" => ""
),
"facebook" => array (
"enabled" => true,
"keys" => array ( "id" => "[private]", "secret" => "[private]" ),
"scope" => "email,publish_stream",
"display" => ""
),
"twitter" => array (
"enabled" => true,
"keys" => array ( "key" => "[private]", "secret" => "[private]" )
)
)
)
),
Solution
Try importing the hybridauth files:
config/main.php
'import'=>array(
...
// for hybridauth
'application.modules.hybridauth.controllers.*',
...
),
OTHER TIPS
I had the same error while installing HybridAuth. Solved it by changing the case of some files.
My Linux server is case sensitive, so the file 'facebook.php' could not be found, while 'Facebook.php' worked