2011-03-03 2 views
0

나는 MGTwitterEngine 아이폰은 OAuth를

는이 같은 오류 I 줄 ... 내가 MGTwitterEngine OAuth는이 코드를 사용하여 ...하지만 나를 위해 작동하지하고 https://github.com/kimptoc/MGTwitterEngine-1.0.8-OAuth

소스에서 OAuth를위한 MGTwitterEngine을 시도 HVE XAUTH Twitter integrated in Iphone App

오류 로그를 사용하지 않고 XAUTH를 사용하여 얻고 있었다 것은 :

Twitter request failed! (3AFB8476-929F-4467-A4FE-DE43358CB62A) Error: The operation couldn’t be completed. (HTTP error 401.) ((null)) 

그리고 한 가지 더의 I h를 ave는 응용 프로그램 키와 암호를 설정하는 데 아무 것도 찾지 못했습니까?

이 오류 일 수 있습니다 .. 제발 도와주세요. 트위터 버튼을 탭

편집 코드

-(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]; 
} 

미트 Battan

답변

0

HTTP 401 오류는 인증 문제에 대해입니다. 프로젝트에서 응용 프로그램은 다음을 수행합니다.

twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self]; 
[twitterEngine setUsername:username password:password] 

응용 프로그램에서 이것을 설정 했습니까?

+0

나는 내가 사용하고 문제의 코드를 추가해야 .. 이런 짓을 –