我已经尝试了来自源MGTwitterEngine的oAuth的https://github.com/kimptoc/MGTwitterEngine-1.0.8-OAuth
我正在为MGTwitterEngine oAuth使用这个代码..。但不是为我工作..。
它给出了我在使用xAuth时遇到的错误,而没有启用xAuth Twitter integrated in Iphone App。
错误日志是:
Twitter request failed! (3AFB8476-929F-4467-A4FE-DE43358CB62A) Error: The operation couldn’t be completed. (HTTP error 401.) ((null))还有一件事,我还没有在设置应用程序的密钥和秘密中找到任何东西?
可能是因为这个错误..。请帮帮我。
推特按钮选项卡上的编辑代码
-(IBAction)twitterBtnAct:(id)sender{
// Put your Twitter username and password here:
NSString *username = @"username";
NSString *password = @"password";
// Make sure you entered your login details before running this code... ;)
if ([username isEqualToString:@""] || [password isEqualToString:@""]) {
NSLog(@"You forgot to specify your username/password in AppController.m!");
}
// Create a TwitterEngine and set our login details.
twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterEngine setUsername:username password:password];
// Get updates from people the authenticated user follows.
[twitterEngine getFollowedTimelineFor:username since:nil startingAtPage:0];
}Amit Battan
发布于 2011-03-10 12:50:07
发布于 2011-03-03 08:18:44
HTTP 401错误涉及身份验证问题。在项目中,应用程序可以:
twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterEngine setUsername:username password:password]你在你的应用程序中设置了这个吗?
https://stackoverflow.com/questions/5178146
复制相似问题