tags:

views:

983

answers:

2

I'm using http://github.com/bengottlieb/Twitter-OAuth-iPhone/tree/master for Twitter+Oauth in my iPhone app. I'm trying to create a facebook connect like feature where can log in and log out of twitter. This paticular Twitter+Oauth implementation doesn't use sessions, so I'm not sure how this works.

Does anyone have experience with this and if so how would I go about logging out?

A: 

I was able to simulate a logout with the following code:

- (IBAction)logoutOfTwitter:(id)sender {
    [oauthEngine release];
    oauthEngine = nil;
    [[NSUserDefaults standardUserDefaults] setObject:@"" forKey: @"authData"];
}
Justin Gallagher
A: 

This also works:

[oauthEngine clearAccessToken];
Chris Newman
Does this clear the user login? If so, this is a lot cleaner!
Joe D'Andrea