I haven't made much progress, so rather then look for an answer to the error stated in my original question, I think my problem would best be solved by some overall instructions on how to use Oauth properly. Please look below to question reformulated.
ORIGINAL QUESTION
I'm using the cocoa-wrapper api for soundcloud on my iPhone app. I'm trying to post with the code below, but get an error 422. I believe it has to do with the string @"x-myapplicationurlscheme://connect", but the url's given to me by soundcloud look like this:
https://soundcloud.com/connect
https://api.soundcloud.com/oauth2/token
http://api.soundcloud.com/oauth/request_token
http://api.soundcloud.com/oauth/access_token
http://soundcloud.com/oauth/authorize
and I don't think they need to be plugged into the Dictionary below. On the other hand I don't know what else to put there. Also, it seems to me there were some errors in the original sample code which I have corrected, but maybe erroneously.
[api performMethod:@"POST"
onResource:@"connections"
withParameters:[NSDictionary dictionaryWithObjectsAndKeys:
@"service", @"twitter",
@"x-myapplicationsurlscheme://connection", @"redirect_uri",
@"touch", @"display", //optional, forces services to use the mobile auth page if available
nil]
context:nil
userInfo:nil];
So the question is....
How do I use this POST correctly? What am I doing wrong that gives the error 422?
QUESTION REFORMULATED
What I'm trying to accomplish is to have the user press a button to be able to connect their Soundcloud account to Facebook. This way they can have audio posted to FB automatically after it is uploaded to Soundcloud.
Below are screen shots of my Soundcloud configuration page and places within my app that need setting up. I believe that it is just a matter of plugging in the right the values in the right place, but I'm not sure exactly how to do this. Help, please!
Also, the last screenshot shows what happens when the user presses the Facebook connect button. Does this look right?
Thanks so much,