Goodreads Developers discussion

93 views
questions > oauth return as additional query parameters?

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

message 1: by Jeremy (new)

Jeremy | 3 comments So, I am writing a Goodreads integration for a friend's XenForo forum. The way the system is structured I need return from Goodreads (oauth_token=x&access=1) to be *additional* query parameters instead of the only query.

Is there a way to accomplish this? Or do I need to be fairly hacky with my integration to get it to have access to the query parameters I need (oauth_token doesn't exist on the return to my site since it is assoc=1?oauth_token=x versus assoc=1&oauth_token=x)?


message 2: by Michael (new)

Michael Economy (michaeleconomy) I'm not sure i understand. Can you go into more detail?


message 3: by Jeremy (new)

Jeremy | 3 comments The application I am writing is all routed through a single index.php file. So we have routes like this:

index.php?register/goodreads

As such, the proper return URL for such a set up would be:
index.php?register/goodreads&oauth_token=x&access=1

However, the application seems to hard code it as its own query string returning this to me:
index.php?register/goodreads?oauth_token=x&access=1

I currently have a hack in my application so I can pull out the oauth_token and continue with the flow since it is associated with another query parameter.


message 4: by Michael (new)

Michael Economy (michaeleconomy) Hmmm, having two unescaped question marks in a url seems invalid.

Although, so does having a parameter without the "="

I'll file a ticket about this, but it sounds like your hack is currently working?


message 5: by Jeremy (new)

Jeremy | 3 comments The two question marks is the issue and currently how Goodreads returns it.

The actually landing Url puts it into the "assoc" query parameter (necessary for my app), so it looks like this:
index.php?register/goodreads&assoc=1?oauth_token=x&access=1

My hack is beyond hacky:
$parts = explode('=', $query['assoc']);
$oauth_token = array_pop($parts);


Having query parameters without = is perfectly fine and used in several instances that I can think of. XenForo manages to route these to appropriately "named" parameters in the code.


message 6: by Michael (new)

Michael Economy (michaeleconomy) Sorry about that!


message 7: by Kent (new)

Kent Rasmussen | 4 comments This was 2 years ago, but it would be super helpful to me as well if this was implemented. Google script needs an extra parameter as well.

https://www.goodreads.com/topic/show/...


back to top