CakePHP実践入門2の
ソーシャル連携でTwitterとCakePHPの連携をしようと思って本の内容に沿って作業しましたが
本に書いてある通り、ログインページにいきません。
何が悪いのでしょうか。
bootstrap.phpとdatabase.phpとAppControllerの設定・ddefault.ctpの設定も行いました。
Webサーバーのアパッチにはエラーログがでてきませんが
Cakephpのappのtmpファイルに格納されているerrorlogには以下の通りで出ています。
cakephp
1Request URL: /cakephp2/twitter/ 2Stack Trace: 3#0 C:\xampp\htdocs\cakephp2\lib\Cake\Controller\ComponentCollection.php(53): ComponentCollection->load('TwitterKit.Twit...', Array) 4#1 C:\xampp\htdocs\cakephp2\lib\Cake\Controller\Controller.php(644): ComponentCollection->init(Object(TwitterController)) 5#2 C:\xampp\htdocs\cakephp2\lib\Cake\Routing\Dispatcher.php(188): Controller->constructClasses() 6#3 C:\xampp\htdocs\cakephp2\lib\Cake\Routing\Dispatcher.php(167): Dispatcher->_invoke(Object(TwitterController), Object(CakeRequest)) 7#4 C:\xampp\htdocs\cakephp2\app\webroot\index.php(118): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse)) 8#5 {main} 92017-08-23 16:31:22 Error: [MissingComponentException] Component class TwitterComponent could not be found. 10Exception Attributes: array ( 11 'class' => 'TwitterComponent', 12 'plugin' => 'TwitterKit', 13) 14Request URL: /cakephp2/twitter/ 15Stack Trace: 16#0 C:\xampp\htdocs\cakephp2\lib\Cake\Controller\ComponentCollection.php(53): ComponentCollection->load('TwitterKit.Twit...', Array) 17#1 C:\xampp\htdocs\cakephp2\lib\Cake\Controller\Controller.php(644): ComponentCollection->init(Object(TwitterController)) 18#2 C:\xampp\htdocs\cakephp2\lib\Cake\Routing\Dispatcher.php(188): Controller->constructClasses() 19#3 C:\xampp\htdocs\cakephp2\lib\Cake\Routing\Dispatcher.php(167): Dispatcher->_invoke(Object(TwitterController), Object(CakeRequest)) 20#4 C:\xampp\htdocs\cakephp2\app\webroot\index.php(118): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse)) 21#5 {main} 22 23コード
こちらがソースコードです。
cakephp
1<?php 2// /app/Controller/TwitterController.php 3 4class TwitterController extends Controller{ 5public $components = array( 6'Session', 7'Auth' => array( 8//認証の設定 9'authenticate' => array( 10'all' => array( 11'fields' => array( 12'username' => 'id', 13'password' => 'pass', 14), 15), 16'TwitterKit.Twitter0auth', 17), 18//ログインURL 19'loginAction' => array( 20'plugin' => 'twitter_kit', 21'controller' => 'users', 22'action ' => 'login', 23), 24), 25'TwitterKit.Twitter', 26); 27} 28コード
わかる方がいらっしゃいましたら、ご回答よろしくお願いいたします。
Cakephpのバージョンは2.10.1です。