Isa K. Isa's Comments (member since Aug 14, 2011)

Isa's comments from the Goodreads Developers group.

(showing 1-3 of 3)

Aug 15, 2011 04:30PM

Aug 15, 2011 02:13PM

8095 Michael: I am using a library, I just can't use the one php library that is known to work with your API. That unfortunately is a framework issue, Codeigniter likes things handled one way, abraham's library handles them another way. (There is a wrapper to try to resolve this, but I haven't had much luck with it).

As for Oauth spec. I wouldn't know, but Twitter uses OAuth and passes the username along with the token so I doubt it. It just seems to me that you would want to minimize the number of calls developers need to make in order to complete a simple task.

I'm pretty sure the issue is the signature, but trouble shooting what specifically about the signature is wrong is a nightmare on so little info.
Aug 14, 2011 07:39PM

8095 This is crazy. My OAuth library can successfully receive tokens but returns the tremendously vague and unhelpful "Invalid Request" when I try to get the user_id

Using PHP here with the codeigniter framework (so good old abraham's Twitter OAuth won't work here sadly). Headers seem to be generating all right:

Authorization: OAuth oauth_consumer_key="", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1313374792", oauth_nonce="724e0ca142fffb57e7199cc0defe82a3", oauth_version="1.0", oauth_token="5943H7ZjwgqOLIcW0BtAQ", oauth_signature="hFt4OE%2FZ9hppoCNrF%2FYZ5iyC1iU%3D"

Signature is generated by applying hma-sha1 to (method + url + secret + an array with token info urlencoded)

I'm no expert on OAuth, usually the library does everything for me ... so I have no idea what I'm doing wrong.

Why on earth is something as simple as the user_id a separate call anyway? Wouldn't it be easier on both the API and the developers if user_id was returned with the token at initial authorization?

topics created by Isa