facebook logout not working properly through FBConnect iphone api

Posted by iVipS on Stack Overflow See other posts from Stack Overflow or by iVipS
Published on 2012-03-28T05:34:54Z Indexed on 2012/06/01 16:40 UTC
Read the original article Hit count: 258

Filed under:
|
|
|

i am executing the following code to logout of faceboook from my iphone app >>

if ([mFacebook isSessionValid]) {
    [mFacebook logout];
}

this code runs successfully and the delegate is called after this in which i am clearing the access token

- (void)fbDidLogout 
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults removeObjectForKey:@"FBAccessTokenKey"];
[defaults removeObjectForKey:@"FBExpirationDateKey"];
[defaults synchronize];

}

but when i again login to facebook, it does not ask for username and password.

Can someone please suggest me what wrong am i doing??

Thanks in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios