When an authentication error occurs while retrieving an access token a message is logged in the watchdog similar to this:

Facebook OAuth could not acquire an access token from Facebook. We queried the following URL: https://graph.facebook.com/[...]. Facebook's servers returned an error: -101

The actual error message is missing. This leaves site administrators in the dark about what actually went wrong.

Also this notice is generated:

Notice: Undefined property: stdClass::$data in fboauth_access_token() (regel 300 van .../sites/all/modules/contrib/fboauth/includes/fboauth.fboauth.inc).

Comments

pfrenssen’s picture

Status: Active » Needs review
StatusFileSize
new1.77 KB

Patch fixes both the notice and the missing error message.

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new1.75 KB

Thanks for the patch! Everything looks good except you don't need to add the check_plain() in there. The use of the @ symbol with run check_plain() automatically as part of the t() function. Committed attached patch to both branches.

quicksketch’s picture

Oh, well the original code had check_plain() in there too, so the error was probably mine originally. No worries. Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added some more information