OAuth.io委托方法没有被称为..任何想法?
ViewController.h
#import <UIKit/UIKit.h>
#import <OAuthiOS/OAuthiOS.h>
@interface ViewController : UIViewController<OAuthIODelegate>
{
OAuthIOModal *authModel;
}
ViewController.m
authModel = [[OAuthIOModal alloc] initWithKey:@"Yk7aY94Vskjj3b6yDy3tWkBEEXo" delegate:self];
[authModel showWithProvider:@"facebook"];
//On success, the didReceiveOAuthIOResponde delegate method is called:
- (void)didReceiveOAuthIOResponse:(OAuthIORequest *)request
{
// Here you can use the request object to make requests directly
// or store it for later use (e.g. when a button is pressed)
}
答案 0 :(得分:2)
接收OAuthResponse可能存在一些问题: -
//在身份验证失败的情况下处理错误
- (void)didFailWithOAuthIOError:(NSError *)error{
NSLog(@"Failure");
}
检查此方法是否正在呼叫。如果这是调用意味着委托方法没有任何问题。
感谢。