0

私はSoundCloudCocoaWrapperAPIを使用しています。ユーザーのSoundCloudアカウントをFacebookアカウントに接続するには、次を使用します。

[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];

これは完全に正常に機能します。SoundCloud接続設定ページで接続が確立されていることがわかります。Facebook UIWebViewページが機能すると、画面が白くなり、アプリケーションのビューに戻りません。言い換えると、UIWebViewは「消える」というメッセージを受け取りません。このメッセージを送信するにはどうすればよいですか?

何か案は?

編集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 

ありがとう :)

4

1 に答える 1

0

Twitter OAuthでは、次のように実行されます。ユーザーが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];

Webビューで作業が完了した後に呼び出されます

于 2011-07-28T10:07:20.967 に答える