我正在使用 Yii 框架和 HybridAuth 进行社交登录操作,我有 google 和 yahoo 工作正常,但我无法让 facebook 和 twitter 工作。
我需要一个 Https:// 域吗?还是只是要添加一些配置?
当我尝试使用 facebook 或 twitter 登录时,我收到了这个 PHP 警告:
include(DefaultController.php) [function.include]:打开流失败:没有这样的文件或目录
错误显示在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;
这是我的主要配置文件
'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]" )
)
)
)
),