简体   繁体   中英

Parse twitter: How to Logout from twitter on ios application

I need to logout from twitter in ios application, i have used twitter parse SDK in my ios application. I have trying to logout from twitter by using [PFUser Logout] and am navigating to my app login page. While i am trying to login into twitter i am not getting twitter login URL, it is directly logged in with previous user Credentials. I have tried logout by using PFTwitterUtils unlink methods but no use.

please will you help me in that..

You can revise the source code of Parse in PFOauth1FlowDialog.m

- (void)loadURL:(NSURL *)url queryParameters:(NSDictionary *)parameters   {
    NSMutableDictionary *_parameter = [[NSMutableDictionary alloc] init];
    [_parameter setObject:@"true" forKey:@"force_login"];
    [_parameter addEntriesFromDictionary:parameters];
    _loadingURL = [[self class] _urlFromBaseURL:url queryParameters:_parameter];
    NSURLRequest *request = [NSURLRequest requestWithURL:_loadingURL];
    [_webView loadRequest:request];
}

Then everything should work fine.

Is your user logged in to Twitter natively (in the iOS settings)? If so, then any attempt to login to twitter with Parse (using one of PFTwitterUtils' logInWith... methods) will use that natively logged in authentication.

If you want the user to be presented with a screen asking for their credentials, you'll have to ask them to log out of twitter natively in iOS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM