Redirect URI mismatch iOS soundcloud

放肆的年华 提交于 2019-12-23 21:25:32

问题


I'm developping an iOS app which use soundcloud API.

I followed this tutorial : https://github.com/soundcloud/CocoaSoundCloudAPI

Everything was fine until the login step.. I try to upload a song (just to try something different), but I had the same result... No fields to logged in.

Sometimes the soundcloud popup disappear after 1 second, other times, nothing appends, the UI stay in this state (with the spinner active).

In the console, I've got this error message :

Ooops, something went wrong: Redirect URI mismatch

On the soundcloud website I put an URI like this one myApp://oauth2, and I wrote the same in the initialize method.

I'm not sure it worked, because when I refresh the editing page, the redirect URI field is blank...

Any idea ?

I'm trying to login to soundcloud with this code :

[SCSoundCloud requestAccessWithPreparedAuthorizationURLHandler:^(NSURL *preparedURL){

    SCLoginViewController *loginViewController;
    loginViewController = [SCLoginViewController
                           loginViewControllerWithPreparedURL:preparedURL
                           completionHandler:^(NSError *error){

                               if (SC_CANCELED(error)) {
                                   NSLog(@"Canceled!");
                               } else if (error) {
                                   NSLog(@"Ooops, something went wrong: %@", [error localizedDescription]);
                               } else {
                                   NSLog(@"Done!");
                               }
                           }];

    [self presentModalViewController:loginViewController
                            animated:YES];

}];

Thanks !

来源:https://stackoverflow.com/questions/11728139/redirect-uri-mismatch-ios-soundcloud

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!