Facebook logout is Not working in FBConnect
===

I am implementing the facebook integration but logout fuction is not working...


My code is as follow:
    
FBSession.m

>     
>     - (void)logout {
>       if (_sessionKey) {
>         for (id<FBSessionDelegate> delegate in _delegates) {
>           if ([delegate respondsToSelector:@selector(session:willLogout:)]) {
>             [delegate session:self willLogout:_uid];
>           }
>         }
>     
>         [self deleteFacebookCookies];
>         
>     
>         _uid = 0;
>         [_sessionKey release];
>         _sessionKey = nil;
>         [_sessionSecret release];
>         _sessionSecret = nil;
>         [_expirationDate release];
>         _expirationDate = nil;
>         [self unsave];
>     
>         for (id<FBSessionDelegate> delegate in _delegates) {
>           if ([delegate respondsToSelector:@selector(sessionDidLogout:)]) {
>             [delegate sessionDidLogout:self];
>           }
>         }
>       } else {
>         [self deleteFacebookCookies];
>         [self unsave];
>       }
>     }

        - (void)deleteFacebookCookies {
        		NSHTTPCookieStorage* cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
            NSArray* facebookCookies = [cookies cookiesForURL:
              [NSURL URLWithString:@"http://login.facebook.com"]];
            for (NSHTTPCookie* cookie in facebookCookies) {
        				[cookies deleteCookie:cookie];
            }
        }

    
    
    

viewcontroller.m

    
    

> - (IBAction)logOutbuttonPressed:(id)sender {
>     
[_session logout];
>         
>     }

