我正在開發一個具有Twitter登錄的應用程序。我已經整合了MGTwitterEngine
,並且一切正常。從MGTwitterEngine獲取用戶詳細信息
我的問題是,當用戶登錄時,我需要一些細節 - 無論哪個信息是由MGTwitterEngine
返回該登錄用戶。
當我看看庫文檔時,發現了下面的委託方法,它可能會提供一些用戶信息,但是當我登錄時,此方法永遠不會被調用。
- (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier {
NSLog(@"User Info Received: %@", userInfo);
}
有人可以請建議我如何從MGTwitterEngine
獲取用戶的信息或者我應該怎麼用這個方法?
_engine = [[SA_OAuthTwitterEngine alloc] initOAuthWithDelegate:self];
_engine.consumerKey = @"PzkZj9g57ah2bcB58mD4Q";
_engine.consumerSecret = @"OvogWpara8xybjMUDGcLklOeZSF12xnYHLE37rel2g";
UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine: _engine delegate: self];
if (controller)
[self presentModalViewController: controller animated: YES];
else {
tweets = [[NSMutableArray alloc] init];
[self updateStream:nil];
}
你有實際設置一個委託發動機? –
@Josh是的一切工作正常。我已經設置它,但沒有得到這個方法被調用。 – Gypsa
而你正在調用'getUserInformationFor:'?並沒有得到任何'requestFailed:withError:'?這可能有助於發佈重現問題的片段。 –