问题
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