Goodreads Developers discussion

OAuth in Objective C

Comments Showing 1-7 of 7 (7 new)    post a comment »
dateDown arrow    newest »

message 1: by Shawn (new)

Shawn Looker (slooker) | 20 comments From another post I got this information:

get a request token: /oauth/request_token
authorize the request token: /oauth/authorize
exchange for access token: /oauth/access_token

I assume those are all as the base url?

When I'm trying to create an OAuth instance in Objective C its asming me for the authenticationURL, which seems like it should be the authorize url, but what is the base url? It is not just (at least not from testing).

Anyone have any ideas?


message 2: by Scott (new)

Scott Forbes (somesmart) | 10 comments If I understand your question correctly is the base url, and you will tack on the /oauth/ piece that is pertinent to the stage in authentication you are at. So when you are requesting the token you will use:

and so on. Hope that helps!

message 3: by Shawn (new)

Shawn Looker (slooker) | 20 comments Yeah, thats what I initially tried and it kept telling me invalid Oauth request. I've got it working (Well, I can get the oauth key/secret after requesting a token) if I do it manually, but I can't get it to work within the objective c framework.

message 4: by Michael (new)

Michael Economy (michaeleconomy) I remember having lots of trouble getting the url in the right state of escapedness when i was doing oauth last time. I haven't worked with obj-c but that would be my first guess.

Maybe you could past some sample code?

message 5: by Shawn (new)

Shawn Looker (slooker) | 20 comments Okay, it looks like I've gotten a bit further than I was a little while back.

Now I'm having a slightly smaller problem.

When I open the oauth url in Safari, its taking me to the "Sign up" page as opposed to taking me to the "login" page. If I click the "sign in" button in the top right, it gives me the correct "Authorize or Deny" screen afterwards, but when I do it in firefox, it takes me to the "Sign In" page as opposed to the "Sign Up" page. Any ideas?

message 6: by Scott (new)

Scott Forbes (somesmart) | 10 comments could it be a cookie issue in the browser itself?

message 7: by Shawn (new)

Shawn Looker (slooker) | 20 comments I suppose thats possible. It does that in Internet Explorer now too. (Goes to the signup as opposed to the login page). I guess this isn't a bad thing per se. Just had to see that signup button on a tiny screen.

back to top