logout from Twitter in iPhone using OAuth+MGTwitterEngine Library

后端 未结 7 2217
逝去的感伤
逝去的感伤 2020-12-17 05:05

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 pos

7条回答
  •  清歌不尽
    2020-12-17 05:57

    I use this tutorial for integreate twitter to iOS app link

    For logout I use next:

    [_engine clearAccessToken];
    

    _engine - this is instance of SA_OAuthTwitterEngine class.

    You can call this method on your IBAction method.

    Also need this method

    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
        [defaults removeObjectForKey:@"authData"];
        [defaults synchronize];
    

提交回复
热议问题