Sign out of Twitter on iPhone using OAuth + MGTwitterEngine Library

I made a twitter application using the OAuth library and MGTwitterEngine. The login phase is working fine, but before logging out I ran into a problem. I sent all the messages about leaving OAuth, but it does not work. So can anyone suggest the perfect method for logging out of Twitter ...? OR What changes should I make to the library file to exit the system. !!

+3
source share
7 answers

There is no way out of OAuth / xAuth on Twitter ... you need to implement a client solution:

  • coredata ( , ) " "
  • ( )

,

+3

- ? , !

: . MGTwitterEngine.m _clearCookies initWithDelegate. , YES. [_engine clearAccessToken]. , , !

+5

, . , ( , ), , , Userdefaults.

0

, clearAccessToken SA_OAuthTwitterEngine " " .

0

, , , ,

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

    [self presentLoginView];
    }
0

, iOS

:

[_engine clearAccessToken];

_engine - SA_OAuthTwitterEngine.

IBAction.

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

Twitter, "" iPhone.

-1

Source: https://habr.com/ru/post/1772439/


All Articles