0
我试图从谷歌,雅虎获取访问令牌。但我得到一个错误,如WACloudAccessControlClient可能不会响应setToken.How在此处声明setToken方法。ios - 如何声明setToken方法?
-(BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType
{
if(_url)
{
/* make the call re-entrant when we re-load the content ourselves */
if([_url isEqual:[request URL]])
{
return YES;
}
[_url release];
}
_url = [[request URL] retain];
NSString* scheme = [_url scheme];
if([scheme isEqualToString:@"acs"])
{
// parse the JSON URL parameter into a dictionary
NSDictionary* pairs = [self parsePairs:[_url absoluteString]];
if(pairs)
{
WACloudAccessToken* accessToken;
accessToken = [[WACloudAccessToken alloc] initWithDictionary:pairs];
[WACloudAccessControlClient setToken:accessToken];
[self dismissModalViewControllerAnimated:YES];
}
return NO;
}
[NSURLConnection connectionWithRequest:request delegate:self];
return NO;
}
任何想法?提前致谢。
感谢您的宝贵答复。我从这个链接得到这个http://www.stevesaxon.me/posts/2011/window-external-notify-in-ios-uiwebview/你可以请通过它和告诉确切的一个? – 2013-05-03 08:27:21
在示例代码中省略了详细信息,我猜这篇文章忽略了一个调用细节,这里的问题同样http://stackoverflow.com/questions/16231636/ios-wacloudaccesscontrolclient-may-not-respond-to- settoken – stefanB 2013-05-03 13:41:38
并在这里看到http://stackoverflow.com/questions/8165778/connecting-ios-with-azure-cloud/11304825#11304825 – stefanB 2013-05-03 13:45:29