Using fbconnect 6x.2x.beta1 with latest D6

Facebook connect has worked up until recently, and now does not work. Returns a facebook dialog that says "error" try again later. Nothing else.

I have tried making sense of what has already been posted to no avail. Is this a problem with the sdk 2.1.1? Does it need upgrading to work?

Any help with this would be appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rogerkemp’s picture

Same problem herre. Somehow quit working last week.

manju123’s picture

:( yes even im facing the same problem.. it was working fine a week before.. Please help if anyone have resolved the problem

timgray’s picture

Priority: Normal » Major

Also having the same problem

...well almost the same - I'm not getting an error message it just takes me back to the login screen.

timgray’s picture

Component: Documentation » Code
vgulla’s picture

Same issue. It quit working last week. On IE, I get this error in the JS error console

Message: FB.getSession incompatible with OAuth2.
Line: 23
Char: 785
Code: 0
URI: http://connect.facebook.net/en_US/all.js

Please help

timgray’s picture

Priority: Major » Critical
learnbydrop’s picture

Hi,

recently I got the same as above error and the facebook functionality is not working properly.

The registration and login functionality is working before december, 8 2011.

But now the registration / login functionality is not working.

When the user clicks, facebook popup is opening, but the login is not working.

thanks

mauroe’s picture

Hi everyone,

I didn't yet test it personally, but my hypothesis is that Facebook changed the authorization mode (moving to OAuth 2.0) and therefore an update of the Facebook Javascript SDK is needed.

See http://developers.facebook.com/docs/reference/javascript/

The date of introduction of the change by Facebook (Dec 13) fits well with the timing of the problem arising in this module.

If anyone of you can try to upgrade the FB SDK and report back here if it works, it would be really helpful.

Mauro

ZeiP’s picture

The most recent dev (6.x-2.x-dev from 2011-Oct-21) worked for me. Please make a release of that ASAP!

ZeiP’s picture

Title: Error connecting to Facebook Please help!!! » Error connecting to Facebook
1959mvp’s picture

Can you explain which SDK you used? Was it 3.1.1?

Also, whenever I try to create an app and get an app id by going to http://facebook.com/developers/apps.php I get redirected from there to my list of Facebook pages. It seems any link that should allow you to create an app will do this.

Anybody have any suggestions?

ZeiP’s picture

I used the most recent one from Git (https://github.com/facebook/php-sdk/).

The create functionality at https://developers.facebook.com/apps worked fine for me, some other one didn't. Try that.

Edit: Seems that d.org removes URLs that are surrounded by less/more than signs...

mauroe’s picture

I've tested now with latest dev version and latest Facebook SDK (3.1.1) and it is still not working.

I get in the JS console 2 errors.

1) When loading: Error: uncaught exception: Error: didn't get the authorization to read the property Proxy.InstallTrigger

2) After clicking to the FB connect button: Error: OAuth2 specification states that 'perms' should now be called 'scope'. Please update.
Source: http://connect.facebook.net/de_DE/all.js
Row: 23

Issue still open...

Edit: using Drupal 6.20, tried with Firefox, Safari and IE - all have same issue.

mauroe’s picture

Status: Active » Closed (fixed)

Problem solved. I've found out that I was using a manually created version of the FB button which included the no longer accepted "perm" property.

Just went back to the original hook function to create the button and it worked.

Closing the issue.

1959mvp’s picture

Hello mauroe-

I am the original poster and cannot understand how your resolution is helping me or the other people on this thread with the issue. We need to keep this issue open until there is a complete understanding of what the resolution is to the FB Connect issues as they relate to the updated Facebook rules.

My problem has bot been solved.

Thanks

ChrisConolly’s picture

Mauroe,

If you can explain a little more what you did to fix this, that would be great. I am using <fb:login-button size="medium" onlogin="facebook_onlogin_ready();" background="dark" v="2">Facebook</fb:login-button> to render the button. I assume thats what you were doing before when you said you were using a manually created version.

How are you now rendering the button in a way that it works again?

Thanks,
Chris

rogerkemp’s picture

Status: Closed (fixed) » Active

Not really sure if that's a real fix, since we're using the module and not some manual insertion of the fbconnect button.

mauroe’s picture

Sorry 1959mvp... I've got too happy of having found (my) bug, that I wrongly thought, this was the solution for all the problems :-)

Since the "standard" implementation of FB connect is working, I assume it is a) either a problem of configuration / connection with Facebook or b) a conflict with other Drupal modules.

I can't really help on b)...

On a)
- If I visit the link: https://developers.facebook.com/apps I can still see the list of my applications, incl. all information e.g. App ID and secret, in the new FB app configuration template. In the "advanced" configuration page, I'm using all standard setting (i.e. disabled) but for Enhanced Auth Dialog which I've put to "enabled". Clearly sandbox mode is also disabled...
- I'm using the SDK 3.1.1
- Did you try to create a completely new app just to test if it works?

mauroe’s picture

Dear Chris,

to your question, here the "new manual" code that the module is putting in the user dialog block and that is working for me:

<div id="fbconnect_button-wrapper" class="form-item">
<fb:login-button scope="email" v="2" background="dark" onlogin="facebook_onlogin_ready();" size="medium">
<a class="fb_button fb_button_medium">
<span class="fb_button_text">Connect</span>
</a>
</fb:login-button>
<div class="description">Connect with Facebook</div>
</div>
</div>
1959mvp’s picture

I have 51 facebook pages and have had 1 app. Now when I log in and go to https://developers.facebook.com/apps it just redirects me to my list of pages. On the developer page I cannot see an app nor do I see the tab to create one. I have tried every link I know about including:

Logging in to developer.facebook.com directly and verifying my phone number.

Trying to create an app from the http://facebook.com/developers - i get redirected to my list of pages with no explanation.

Has anybody else experienced this? For some reason I cannot create an app, access secret key or app id. If I am in developer area, and go to apps. I get redirected to my page list.

What gives?

Tech_Musings’s picture

Hello Everyone,

In order to resolve this issue you need to update you php sdk library (3.1.1) so it's better if you install the latest fbconnect module along with latest php sdk library then this problem has gone.

Hope it will help some one who is facing the same problem for facebook connection.

thanks,
Anil

egonrp’s picture

Hi everyone! Try these modifications:

1) Upgrade to Facebook PHP SDK 3.1.1
2) Modify <fb:login-button> "perms" attribute to "data-scope"
Before:
<fb:login-button perms="email" on-login="my_function_login_complete(arguments)">
Facebook Logon
</fb:login-button>
After fix:
<fb:login-button data-scope="email" on-login="my_function_login_complete(arguments)">
Facebook Logon
</fb:login-button>
3) Replace JavaScript function call "FB.getSession" for "FB.getAuthResponse"
4) Alter JavaScript function parameter "response" in "FB.login()"
a) response.session => response.authResponse
b) response.session.access_token => response.authResponse.accessToken
Before:
FB.login(function(response) {
  if (response.session) {
    console.log("User is connected to the application.”);
    var accessToken = response.session.access_token;
  }
});
After fix:
FB.login(function(response) {
  if (response.authResponse) {
    console.log("User is connected to the application.”);
    var accessToken = response.authResponse.accessToken;
  }
});
5) Alter JavaScript function parameter "response" in "FB.getLoginStatus()"
a) response.session.user_id => response.authResponse.userID
b) response.session.access_token => response.authResponse.accessToken
Before:
FB.getLoginStatus(function(response) {
  if (response.status === 'connected') {
    var uid = response.session.user_id;
    var accessToken = response.session.access_token;
...
After fix:
FB.getLoginStatus(function(response) {
  if (response.status === 'connected') {
    var uid = response.authResponse.userID;
    var accessToken = response.authResponse.accessToken;
...

More details here:
https://developers.facebook.com/blog/post/503
https://developers.facebook.com/blog/post/525/

Good luck! :)
Egon

PapaGrande’s picture

For anyone else struggling with this, I thought I would make the instructions more explicit.

  1. Download this fb_connect build, http://drupal.org/node/849528, or later (Note the 'Last Updated' dates--the so-called newer releases are actually older!)
  2. Download the latest FB SDK build at https://github.com/facebook/php-sdk/downloads and extract the files
  3. In the fb_connect module folder, put the three FB SDK files there

That worked for me to get FB logins working again. Hope that helps you.

anikdoht’s picture

^^^ PapaGrande, I could tongue kiss you!!! That fix worked like magic!!!

ratinakage’s picture

Could this go in the release version?

ChrisConolly’s picture

PapaGrande,

I downloaded the version of fbconnect you posted, downloaded the newest version of php-sdk, extracted the whole lot into the fbconnect folder. When i try to login it communicates with facebook quickly then comes back and does nothing.
The log page comes up with this: fbconnect_autoconnect_form_submit has been called without valid facebook session. Check your Application Secret on fbconnect settings page.

Now the application secret is definitely correct, however the connect url just says: Copy this value into Facebook Applications on Connect settings tab. Im assuming my problem lies here, any ideas?

Chris

ShaneOnABike’s picture

Wow! Genius.. this has completely worked for me as well. Seems like a bit of an issue and should be documented? I couldn't get this to work until it found these instructions of several hours of frustration :/

paolomainardi’s picture

This module really needs some love, please someone can update the official documentation ?

jcisio’s picture

Category: support » task

I'm working on 7.x branch only. If you need change in README for 6.x, please submit/review patches.

paolomainardi’s picture

@jcisio thanks for your reply. The problem is that 6.x-2.0-beta1 release is broken, would be fine just to write it in the project page till a solution is found.

jcisio’s picture

Ok I made a note in the project page. If some 6.x users agree, I'll make a beta2 release with the current code base in dev. However I can't test anything.

drugget’s picture

Hi all!

I'm having the same problem on 7.x version.
Facebook login window opens, but says "An error occurred. Please try again later."

I did everything:
1. Facebook PHP sdk - the last, 3.1.1.
2. API Key and Secret is correct - checked it twice!
3. Domain is also correct (I'm using the path like http://beta.example.co.uk - but I don't think it is a big problem).
4. Tried to use latest dev of the module - but still not working...

Alex Oliver Perez’s picture

PapaGrande thanks a lot.

#23 works great.

kside21’s picture

Im having the same problem and nothing seems to be working Someone Help

sumit_drupal’s picture

FileSize
25.55 KB

I am using "Fbconnect 6.x-2.0-beta1+11-dev".It is working fine but it does not allow user to login First to invite HIs/her Facebook Friends.
Problem is that When user is not logged on facebook in the same browser then It just rendering the Empty "Facebook Friends" box rather than the FB:login or FB:connect button.It works fine when user already Logged on facebook in same browser.
Please see the attached "withoutlogin.JPEG"

MohammadMoussa-Lebanon’s picture

hi guys
Download this fb_connect build, http://drupal.org/node/849528, or later (Note the 'Last Updated' dates--the so-called newer releases are actually older!)
Download the latest FB SDK build at https://github.com/facebook/php-sdk/downloads and extract the files
In the fb_connect module folder, put the three FB SDK files there

at fbconnect.admin.inc >>>>
$form['fbconnect_connect_url'] = array(
'#type' => 'item',
'#title' => t('Connect url'),
'#description' => t('Copy this value into Facebook Applications on Connect settings tab'),
'#value' => variable_get('fbconnect_connect_url', $GLOBALS['base_url'] . '/'),
);

after changing item to textfield , login works fine :):):)

vindesh’s picture

Issue tags: +fbConnect
FileSize
20.7 KB

Hi everyone!

I faced same problem....and I resolved that.

Apply this change in your facebook Apps setting : SANDBOX MODE = OFF

MohammadMoussa-Lebanon’s picture

i Have found this module from lullabot which is perfect and working fine directly without any problems

HERE

shijobaby’s picture