Goodreads Developers discussion

49 views
bugs > [php] Problem with book/title.xml

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

message 1: by Galal (last edited Oct 20, 2013 05:07AM) (new)

Galal Aly | 1 comments Hello,

I am trying to get the reviews iframe of a certain book through the book title (as some arabic books do not have ISBN codes entered - and that was the client's request).

Anyway, sometimes the reviews iframe widget is returned empty. Here is part of my code:


$response = wp_remote_get( 'http://www.goodreads.com/book/title.x...' . $title . '&rating=1' );
$xml = wp_remote_retrieve_body(&$response);
...
...
echo $xml_obj->book->reviews_widget;


and here is an example of it working: (click on the goodreads tab)
http://store.almasriah.com/?product=%...

and here is an example of it that does not work even though there are some reviews:
http://store.almasriah.com/?product=%...

I read this topic: http://www.goodreads.com/topic/show/8...

but some of the books have many reviews and am not sure that this is my problem.

Thanks


message 2: by Jeff (new)

Jeff (jeffwong) | 75 comments Mod
Hi,

The reviews widget only supports lookup by ISBN, and the only API I see that supports searching by title is search.books, which does not return ISBNs.

The book in question, 15765818, actually does have an ISBN listed your site. You could fix this case by requesting that a librarian add the ISBN for this book to Goodreads. In general, though, we can't return reviews without an ISBN.


back to top