Goodreads Developers discussion

15 views
questions > Follow a user

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

message 1: by Gregg (new)

Gregg (greggmarshall) | 105 comments I'm not sure I understand the documentation for this API..

It says
"Start following a user using OAuth. You'll need to You'll need to register your app (required).
URL: http://www.goodreads.com/user//follow...
HTTP method: POST
Parameters:
• id: Goodreads user id of user to follow"

Do you pass the user id of who you want to follow in the part of the URL?

Or do you pass the user id of who you want to follow as the id parameter? If you pass it as a parameter, what should be put in the part of the URL?


message 2: by Michael (new)

Michael Economy (michaeleconomy) It should be part of the url, and not as a parameter, this could be clearer.


message 3: by Gregg (new)

Gregg (greggmarshall) | 105 comments Something isn't quite right

I did a POST call to
POST /user/2450538/followers HTTP/1.0 Host: www.goodreads.com User-Agent: Drupal (+http://drupal.org/) Content-Length: 0 Authorization: OAuth oauth_version="1.0",oauth_nonce="e36e747bece651eee2f83755d970866b",oauth_timestamp="1328879612",oauth_consumer_key="DELETED",oauth_token="vBIkV8jtucKKYTvAd8rvHQ",oauth_signature_method="HMAC-SHA1",oauth_signature="GFrYGtvL3BG4AnQIVwS76oLR1UQ%3D"

Got an 200 OK response, but the data returned would seem to indicate an error:
$("follow_container_user_2450538").update("Something went wrong! Follower can't be blank");
And it doesn't seem like the person I was trying to follow (one of the other members of this group) appears on my list of people I'm following on the Goodreads site.


message 4: by Michael (new)

Michael Economy (michaeleconomy) oh! you need to specify the format.


either /user/2450538/followers.xml

or add a parameter: format=xml


message 5: by Michael (new)

Michael Economy (michaeleconomy) hmmm, also something is missing


message 6: by Gregg (new)

Gregg (greggmarshall) | 105 comments good, because doing a post with .xml gives an error

OAUth POST URL => http://www.goodreads.com/user/2450538...

returns error 400: Unprocessable Entity


message 7: by Michael (new)

Michael Economy (michaeleconomy) everything looks ok on your end other that the missing format, I'll make sure we address this soon and have tests on this code also.


message 8: by Gregg (new)

Gregg (greggmarshall) | 105 comments ok, I tried both the .xml and format=xml variants and get the same error.


message 9: by Michael (new)

Michael Economy (michaeleconomy) Ok, we verified it was a bug on our end. It's been fixed, but in a branch that may not go live for week or two. Sorry it may take a while!


message 10: by Gregg (new)

Gregg (greggmarshall) | 105 comments Fortunately our use case isn't going to use it in the short term so a week or two won't be a problem. I just need to remember to check it when it does go live. Please post something when it does if you can remember.

Thanks.


back to top