Ashley Ashley’s Comments (group member since Jun 12, 2013)


Ashley’s comments from the Goodreads Developers group.

Showing 1-6 of 6

May 11, 2016 05:03AM

8095 Unfortunately there's nothing I can do on my end if GoDaddy is indeed blocking ports, which seems to be the case. :(
Feb 12, 2015 02:55AM

8095 I'm not having problem with curl and oauth with any of my other 80+ customers. It's just this person's site specifically.

The code snippet I pasted is not from the oauth part of the plugin. That was just an example completely unrelated to oauth of how a simple curl function fails on this server. Simply fetching goodreads.com with no oauth code returns a 403 Forbidden error. That says there's something fundamentally wrong.

In my actual oauth code I do follow all the guidelines and set the callback_url.

The code is working perfectly fine on 80+ other sites. It's just this specific site/server where there's any problem.
Feb 06, 2015 04:24AM

8095 I believe the reason her API key isn't showing up in your logs is because it never gets to that point.

OAuth uses cURL on the request token page ( http://www.goodreads.com/oauth/reques... ). But that's returning a 403 error (as noted above...) so she never actually gets to the point of passing through the API key and approving the connection.

Any request to any Goodreads page results in a 403 from her server, so the API key never even reaches a Goodreads connection.
Feb 05, 2015 03:35AM

8095 The plugin uses OAuth. I don't believe it's a problem with the plugin because about 80 other people use it without any issues. It's her site specifically that gets a 403.

And as you can see from the code above, simply performing a curl request on the Goodreads homepage results in a 403 forbidden. Pasting that EXACT same code on any of the sites where the plugin works does not result in a 403.

That code I pasted is just an example. The plugin in question uses OAuth, and she is also getting errors when using OAuth to try to connect to Goodreads itself. She can't even get to the stage of posting a new review via the plugin because she can't authorize her account with Goodreads in the first place due to the 403. The plugin has two stages:

1) Connect to Goodreads using OAuth
2) Submit a post to Goodreads to use as a review

She cannot get past step #1 so she hasn't even attempted doing #2 yet since she can't get the connection in the first place.
Jan 21, 2015 04:39AM

8095 Well the root of the problem is that every single request is returning back a 403 Forbidden error. For instance:

function ubb_fetch_page($url, $timeout = 5) {
$raw = false;
if (in_array('curl', get_loaded_extensions())) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
$raw = curl_exec($ch);
curl_close($ch);
}
else {
$raw = @file_get_contents($url);
}
return $raw;
}

$page = ubb_fetch_page('https://www.goodreads.com');
var_dump($page);

===============

That returns back a 403 Forbidden page. As do all the OAuth requests, presumably for the same reason (whatever that is). This doesn't happen on any other sites where the plugin is working.
Jun 12, 2013 12:12PM

8095 Just elaborating on this, following Twitter conversation with @Goodreads :

Here is another example of this:

http://www.goodreads.com/book/title?f...
The above XML formatted URL returns full book information, including image/title/author/series/etc.

You switch the format to JSON and get this:
http://www.goodreads.com/book/title?f...

Totally different stuff for "reviews_widget"