and generate any error messages:
- php message - on the page top: {"error":{"message":"Error validating verification code.","type":"OAuthException"}}
- error message (type: php): Notice: Undefined variable: authentication_values fboauth_access_token() ... (fboauth.fboauth.inc 274 row)
- logs type: fboauth - Facebook OAuth could not acquire an access token from Facebook. We queried the following URL:
https://graph.facebook.com/oauth/access_token?client_id=226116980783627&...
. Facebook's servers returned an error 400:
1
- logs type: fbauth - A Facebook request code was expected but no authorization was received.

I tried the 6.x.1.1 version, but it doesn't work. Please enlighten me, Thank you!

CommentFileSizeAuthor
#12 fboauth_clean_urls.patch3.79 KBquicksketch

Comments

quicksketch’s picture

This might seem obvious, but have you set up your Facebook API settings per the instructions in README.txt? I've tested out the 1.1 version, which is working for me.

areynolds’s picture

I was having trouble seeing the admin settings page (where you set the FB API settings; see http://drupal.org/node/1305340), so make sure you didn't miss that. Although it looks like the query string sent to FB is complete in the URL you give...

Adam S’s picture

+1 @ areynolds

lohndaniel’s picture

Was It running with https protocol when tested this module? I'm trying simple http. Is this may for bug source?

areynolds’s picture

I think Facebook uses the https protocol on all its graph queries. I've been running the module on a site using regular http protocol and it works fine. You're sure that you've set the FB configuration values in admin/config/people/fboauth?

lohndaniel’s picture

Title: 400 error given if clean URLs are disabled » This module isn't working
Status: Needs work » Active

Yes, I reconfigure:
App ID = App ID/API Key (dev.fb.com)
App Secret = App secret (dev.fb.com)
Import Facebook e-mail address: (tick)
User name import: Facebook username (i.e. johnsmith)
USER FIELD MAPPING: one filed (birthday)

error message - Notice: Undefined variable: authentication_values fboauth_access_token() (drupal7/sites/all/modules/fboauth/includes/fboauth.fboauth.inc 274 row).

UPDATE: Success!
The module does not work if clean url setting is disabled.
I reconfigure my webserver and ok all.

Thanks for your help!

areynolds’s picture

Do you get to the FB permissions granting screen? It doesn't tell you anything useful after you grant permissions, does it? I know when my FB settings have been incorrectly configured (for example, not referencing the correct site URL) FB has notified me of the error and its cause after the permissions fail.

areynolds’s picture

Title: This module isn't working » 400 error given if clean URLs are disabled
Status: Active » Needs work

Good, glad you figured it out. I've changed the title to reflect the presumed bug so we can start resolving the issue.

lohndaniel’s picture

Title: This module isn't working » 400 error given if clean URLs are disabled
Status: Active » Needs work

Thank you!

alican.k’s picture

can this issue be solved by preventing the module until user enable clean urls ? or an option for enabling it on the fboauth ettings page? or only a warning message ?

quicksketch’s picture

We should be able to get this module working even if you don't have Clean URLs enabled, I think it'll just be a minor change in the code. I'm attending a conference this week but I'll get to it if I get the chance.

quicksketch’s picture

Status: Needs work » Needs review
StatusFileSize
new3.79 KB

This patch should solve the problem by encoding slashes in the URL before it's sent to Facebook. Drupal intentionally does not encode its own slashes in URLs, but Facebook requires it. Patch should work on both D6 and D7.

quicksketch’s picture

Title: 400 error given if clean URLs are disabled » Login fails with "400 error" if clean URLs are disabled
Status: Needs review » Fixed

Committed to both branches. I'll be making a 1.2 release after addressing the other issues in the queue.

Status: Fixed » Closed (fixed)

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