Problem with facebook-opengraph extention

Hi.

I’m trying to use the facebook-opengraph but I’ve an error “An active access token must be used to query information about the current user.”

This happens when my user logs in with


Yii::app()->facebook->getloginurl(array('redirect_uri'=>Yii::app()->createAbsoluteUrl('site/registration')))

and in my site controller on actionRegistration I have


$results = Yii::app()->facebook->api('/me');

And another fact:

I logged-in and tried to get my uid with


Yii::app()->facebook->user;

But it was equal to 0 until i used


Yii::app()->facebook->getloginurl()

Am I doing something wrong?

Edit:

I found the solution. I deleted session before call the api…

And i don’ know how delete a post… :s