Reputation: 7071
I have implemented Facebook connect on my iPhone App to login users to my app using their FB credentials.It working fine on simulator.But when am testing from my iPod ,only one user can login (this user who first logged in to the App), others cant logged in. Anybody knows what is the issue, i think FB session is write inside any files in the device, how we clear this?
Help is highly appreciated.
Thanks, VKS
Upvotes: 0
Views: 195
Reputation: 569
Actually all login credential are stored inside NSUserDefault. So, you need to remove those credentials from NSUserDefault. Follow the following steps: [_facebook logout:self]; It will call delegate method:
- (void)fbDidLogout{
// Remove saved authorization information if it exists
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
if ([defaults objectForKey:@"FBAccessTokenKey"]) {
[defaults removeObjectForKey:@"FBAccessTokenKey"];
[defaults removeObjectForKey:@"FBExpirationDateKey"];
[defaults synchronize];
}
}
Upvotes: 1