Re: CakePHP and Facebook login system COOKIE ERROR
Hi there,
Was using the same guide and found that it doesn't work as written.
Apparently Components are not initialized until after the Controller
has been instantiated. Thus, using a Component in the constructor as
described in the guide does not work. It was recommended to me that I
should use the beforeFilter instead.
Best of luck.
On Aug 28, 9:23 am, "Mariano C." <mariano.calan...@gmail.com> wrote:
> I was reading this guide (http://bakery.cakephp.org/articles/view/integrating-facebook-connect
> ) , I get an error about cookie:
>
> Notice (8): Undefined property: UsersController::$Cookie [CORE/cake/
> libs/controller/app_controller.php, line 113]
> Fatal error: Call to a member function read() on a non-object in /cake/
> libs/controller/app_controller.php on line 113
>
> This is the error details:
> AppController::get_facebook_cookie() - CORE/cake/libs/controller/
> app_controller.php, line 113
> AppController::__construct() - CORE/cake/libs/controller/
> app_controller.php, line 49
> Dispatcher::__getController() - CORE/cake/dispatcher.php, line 385
> Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 116
> [main] - APP/webroot/index.php, line 83
>
> line 113 in app_controller is:
> $tmp = $this->Cookie->read('fbs_'.$app_id.'');
>
> line 49 is:
> $this->FACEBOOK_COOKIE = $this->get_facebook_cookie($this-
>
> >FACEBOOK_APP_ID, $this->FACEBOOK_SECRET);
>
> Where I Wrong? I have added 'Cookie' in components array but nothing
> change.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home