Hi arti,

In your code both if-else statements say 'logout', one should be 'login'. 
And I also dont see that you actually log off facebook. You just destroy the 
cake session, the fb session is still valid.
If you want to use facebook with cake I recommend the Plugin by webtechnick. It 
also works perfectly with cakes Auth component.

-flosky



arti grover <groverar...@gmail.com> schrieb:

Hi,


Hello all,


i  have made a logout button in my app.in userheader and header 
respectively.But when i click on logout button it logs me out of app but not 
from facebook and also after logging out from app again when i login it doesnot 
delete the session but again logs me in via my facebook account....plz help...

Header code
if($this->Session->read("facebook_id")==1)
                { 
                echo $html->link('logout', array('controller' => 'users', 
'action' => 'logout'));

                
              
        
                    
                    

              
                }
                else
                {
           
                <a href="<?php echo ABSOLUTE_URL; ?>/users/logout"><?php 
__('logout')?></a>
               } 


logout function in controller code
$this->Session->delete('userdetails');
     $this->Session->delete('facebook_id');
      $language_name=$this->Session->read('language');
     $this->Session->destroy();

-- 
Regards
Arti Grover

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.
 
 
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php
  • facebook bug arti grover
    • Re: facebook bug flo.kl...@googlemail.com

Reply via email to