logout from Twitter in iPhone using OAuth+MGTwitte

2019-01-24 21:35发布

I had made the twitter application using the OAuth and MGTwitterEngine Library. The login phase is working fine but I am facing problem in logout. I had referred all the post of logout for OAuth but it doesn't works. So can anyone suggest the perfect method for logout from the Twitter ...? OR What changes I have to make in the Library file for the logout..!!

7条回答
别忘想泡老子
2楼-- · 2019-01-24 22:29

Might be kinds of stupid, but this seems to work

- (IBAction)logout:(id)sender {
    [_engine dealloc];
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults removeObjectForKey:@"authData"];
    [defaults synchronize];

    [self presentLoginView];
    }
查看更多
登录 后发表回答