2012-04-13 2 views

답변

0

당신은 그것을 필요하지 않습니다. iOS5에서는 iOS 설정에 사용자 이름과 암호를 입력하면됩니다. TWTweetComposeViewController을 사용하고 콜백 블록 (completitionHandler)을 올바르게 관리하면됩니다. 블록에서 조작에 대한 상태를 수신합니다.

TWTweetComposeViewControllerResult Possible values for the result parameter of the completionHandler property. 

enum TWTweetComposeViewControllerResult { 
    TWTweetComposeViewControllerResultCancelled, 
    TWTweetComposeViewControllerResultDone }; 
typedef enum TWTweetComposeViewControllerResult TWTweetComposeViewControllerResult; 


그냥 클래스 메소드 클래스 TWTweetComposeViewController+ (BOOL)canSendTweet을 사용하여 트윗을 보낼 수있는 경우 필요가 알 수있는 경우

.
더 많은 제어가 필요한 경우 TWTweetComposeViewController 대신 TWRequest을 사용할 수 있습니다. 여기
확인이 :이 MGTwitterEngine을 사용 https://developer.apple.com/library/ios/#documentation/Twitter/Reference/TwitterFrameworkReference/_index.html

+0

내장에 대해 이야기하고, – xonegirlz

+0

는 계정 자격 증명 매개 변수에 https를 확인하여 TWRequest를 만들어보십시오 TWTweetComposer하지 : // dev.twitter.com/docs/api?
GET account/verify_credentials \t HTTP 200 OK 응답 코드와 인증에 성공한 경우 요청한 사용자의 표현을 반환합니다. 401 상태 코드를 반환하고 그렇지 않으면 오류 메시지를 반환합니다. 이 메서드를 사용하면 제공된 사용자 자격 증명이 유효한지 테스트 할 수 있습니다. – Andrea

0

이 시도 :

-(IBAction)updateTwitter:(id)sender { 

    [tweetTextField resignFirstResponder]; 

    if(![_engine isAuthorized]){ 
     UIViewController *controller = [SA_OAuthTwitterController controllerToEnterCredentialsWithTwitterEngine:_engine delegate:self]; 
     if (controller) { 
      [self presentModalViewController:controller animated:YES]; 
     } 
    }else 
    { 
     [_engine sendUpdate:tweetTextField.text]; 
    } 
} 
+0

, 나는이 (가)에서 iOS 5 트위터 내가 TWRequest 일에 대해 이야기하고 – xonegirlz

관련 문제