Я использовал GTMOAuth для успешного входа в Dropbox, но я, похоже, не могу заставить делегата выполнить обратный вызов после ответа ответа У меня есть этот код для login ..Получение делегата для обратного вызова при успешном удалении входа в систему с использованием REST api через GTMOAuth
NSURL *requestURL = [NSURL URLWithString:@"https://api.dropbox.com/1/oauth/request_token"];
NSURL *accessURL = [NSURL URLWithString:@"https://api.dropbox.com/1/oauth/access_token"];
NSURL *authorizeURL = [NSURL URLWithString:@"https://www.dropbox.com/1/oauth/authorize"];
NSString *scope = nil;
GTMOAuthAuthentication *auth = [self authForTwitter];
if (auth == nil) {
// perhaps display something friendlier in the UI?
NSAssert(NO, @"A valid consumer key and consumer secret are required for signing in to Twitter");
}
// set the callback URL to which the site should redirect, and for which
// the OAuth controller should look to determine when sign-in has
// finished or been canceled
//
// This URL does not need to be for an actual web page; it will not be
// loaded
[auth setCallback:@"https://www.dropbox.com"];
NSString *keychainItemName = nil;
if ([self shouldSaveInKeychain]) {
keychainItemName = kTwitterKeychainItemName;
}
// Display the autentication view.
GTMOAuthViewControllerTouch *viewController;
viewController = [[[GTMOAuthViewControllerTouch alloc] initWithScope:scope
language:nil
requestTokenURL:requestURL
authorizeTokenURL:authorizeURL
accessTokenURL:accessURL
authentication:auth
appServiceName:keychainItemName
delegate:self
finishedSelector:@selector(viewController:finishedWithAuth:error:)] autorelease];
// We can set a URL for deleting the cookies after sign-in so the next time
// the user signs in, the browser does not assume the user is already signed
// in
[viewController setBrowserCookiesURL:[NSURL URLWithString:@"http://api.dropbox.com/"]];
// You can set the title of the navigationItem of the controller here, if you want.
[[self navigationController] pushViewController:viewController animated:YES];
Я пробовал редактировать библиотеку, но безуспешно.