我在从 LinkedIn 注销时遇到问题。我希望用户在执行注销方法后看到带有用户名和密码的 LinkedIn 唱歌。
唱入法:
NSURL *authorizeTokenURL = [NSURL URLWithString:@"https://www.linkedin.com/uas/oauth/authenticate"];
NSURL *accessTokenURL = [NSURL URLWithString:@"https://api.linkedin.com/uas/oauth/accessToken"];
GTMOAuthViewControllerTouch *authViewControllerTouch = [[GTMOAuthViewControllerTouch alloc] initWithScope:nil language:nil requestTokenURL:requestTokenURL authorizeTokenURL:authorizeTokenURL accessTokenURL:accessTokenURL authentication:authentication appServiceName:@"AppServiceName" delegate:self finishedSelector:@selector(linkedInAuthSelector:finishedWithAuth:error:)];
[authViewControllerTouch setBrowserCookiesURL:[NSURL URLWithString:@"https://api.linkedin.com/"]];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:authViewControllerTouch];
[self presentViewController:navigationController animated:YES completion:nil];
出线方法:
- (void) logout{
[GTMOAuthViewControllerTouch removeParamsFromKeychainForName:@"AppServiceName"];
}
但是,下次我唱歌时,OAuth 错过了我需要输入 LinkedIn 凭据的步骤。
该应用程序仅在删除并重新安装时才请求登录名和密码。