2011-07-28 11 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アカウントにユーザーSoundCloudがアカウントを接続するには、私は、接続が私のSoundCloudが接続設定ページで行っていることがわかります。これは、いったん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 

感謝:)それは次のように行われているのTwitterのOAuthで

答えて

0

を。ユーザープレスがUIWevView上のボタンを承認した後、dismissModalViewControllerAnimatedは、そのビューを閉じるために呼び出されます。

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

だから私はあなたがこのような何か書く必要がありますね:あなたの仕事をして行われた後に呼ばれるように

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

をウェブビュー

関連する問題