2011-07-28 3 views
0

나는 SoundCloud Cocoa Wrapper API을 사용하고 있습니다. 완벽하게 잘 작동HTTP 호출 후 UIWeb보기에서 기본보기로 돌아 가기

[scAPI performMethod:@"POST" 
     onResource:@"connections" 
    withParameters:[NSDictionary dictionaryWithObjectsAndKeys: 
        @"facebook_profile", @"service", 
        @"http://imc", @"redirect_uri", 
        @"touch", @"display", //optional, forces services to use the mobile auth page if available 
        nil] 
      context:@"newConnection" 
      userInfo:nil]; 

이 : 내가 연결이 내 사운드 클라우드 연결 설정 페이지에서 변경되는 것을 볼 수 있습니다 자신의 페이스 북 계정에 사용자에게 사운드 클라우드 계정을 연결하려면 나는 이것을 사용합니다. 문제는 일단 Facebook UIWebView 페이지가 화면을 흰색으로 처리하고 응용 프로그램의 화면으로 돌아 가지 않으면됩니다. 즉, UIWebView는 '멀리'메시지를 가져 오지 않습니다. 이 메시지를 어떻게 보내야합니까?

아이디어가 있으십니까?

EDIT 도움이 될 1 개

일부 기타 정보 :

#define kCallbackURL    @"imc://oauth"  //remember that the 
myapp protocol also is set in the info.plist 
PLIST URL identifier     com.imc 
PLIST URL Scheme Item 0   imc 

감사합니다 :)이 다음과 같은 방식으로 이루어집니다 트위터의 OAuth에서

답변

0

합니다. 당신의 작업이 이루어집니다 후

[self performSelector: @selector(dismissModalViewControllerAnimated:) withObject: (id) kCFBooleanTrue afterDelay: 1.0]; 

가 호출 될 :

if ([_delegate respondsToSelector: @selector(OAuthTwitterController:authenticatedWithUsername:)]) [_delegate OAuthTwitterController: self authenticatedWithUsername: _engine.username]; 
[self performSelector: @selector(dismissModalViewControllerAnimated:) withObject: (id) kCFBooleanTrue afterDelay: 1.0]; 

그래서 난 당신이 뭔가를 작성해야 추측 : 사용자 프레스 UIWevView 버튼을 허가 한 후, dismissModalViewControllerAnimated 해당보기를 닫라고 웹보기