webtechnick/CakePHP-Facebook-Plugin — Issue #51: Facebooks users information only show after second acess
Author: guitcastro
Created: 2012-02-09 22:04:27+00:00
State: open

I'm using cakephp 2.0

step to procedure :

```function beforeFacebookSave(){
$this->Connect->authUser['User']['name'] = $this->Connect->user('name');
return true; //Must return true or will not save.
```}

Erase cookies and the user in the table ...
Try to acess your application , the name in table will be null.
Refresh the page and the name will be update.

I fix it puting this lines in Initialize (and remove startup method), but was a total random guess and i don't know the consequences of this.
```if (!$this->noAuth && !empty($this->uid)) {
$this->__syncFacebookUser();
```}