Have just read this post - https://developers.facebook.com/blog/post/503. Looks like PHP SDK v2 will no longer work starting September 1st.

As this is my first implementation of fbconnect, I wonder if it makes sense to wait for the required changes to the module, or just do it twice - now and later on (before Sep. 1st)

Comments

lismail’s picture

I have used v2.1.0 FB sdk on my site. There was no FB button displayed on login/register page while it worked well before. Upgrade to v2.1.2 SDK could not solve the problem. I got WSOD when I upgraded to v3.0.0 sdk and enabled fbconnect module. Looks like v2.x.x sdk are no longer work with current FB, while fbconnect module is not ready for v3.x.x.

Now I disable the fbconnect module as it has no function at all with current sdk.

koppie’s picture

Priority: Normal » Critical

Subscribing. Looks like this module won't work until it's been updated?

kevinquillen’s picture

I can't get this module to work at all. Links/buttons etc are broken.

venusrising’s picture

The current stable build works with SDK 2.1

venusrising’s picture

I would be good to get clarity from the developer when a version will work with SDK and suggested version per module.

geerlingguy’s picture

SDK 3.x has some major changes compared to 2.x, so I would presume that 2.x is the only supported sdk version at this time, and likely will be until the module is updated to work with 3.x specifically.

unegro’s picture

Yes it dont work anymore. The version 2x don't work anymore.

venusrising’s picture

Please this has been in the works for some time. We now also have a production site that does not function with facebook connect anymore. Can someone please look at this.

giorgio79’s picture

Perhaps you can contact the developer with your proposed budget.

venusrising’s picture

@giorgio79 I am sure if several of us offered up some money it may help. I am sure you too could contact the developer with your proposed budget.

ifeelgood’s picture

After getting very frustrated finally I am able to make this module work. My problem was the facebook connect does not appear on the login page and a couple more after that.

venusrising’s picture

@ifeelgood What did you do to make this work with the new SDK?

venusrising’s picture

Willing to offer up some money if we all pitch in to get this updated to SDK 3

danvuquoc’s picture

Status: Active » Needs review
StatusFileSize
new4.94 KB

https://developers.facebook.com/roadmap/

Roadmap says October 1st, 2011 and no more < SDK 3.x.

Forgive me if I'm breaking protocol, or if I committed something incorrectly -- this is my first time contributing anything to a Drupal module or using GIT for that matter. I've followed instructions on http://drupal.org/node/356460/git-instructions/6.x-2.x to the best that I understood. Please feel free to correct me if "needs review" is not the right status for this. I've attached a patch.

ifeelgood’s picture

Status: Needs review » Active

I used 2.1 :(. Sorry if you guys got confused.

danvuquoc’s picture

Not sure what you mean...?

ifeelgood’s picture

@danvuquoc thanks for the patch, mind doing that to 7? ^_^

geerlingguy’s picture

Status: Active » Needs review
danvuquoc’s picture

StatusFileSize
new228 bytes

Oh you'll also need to put this in the module, it is just a channel.html which has the follow content in a single line in it:

<script src="http://connect.facebook.net/en_US/all.js"></script>

This is according to https://developers.facebook.com/docs/reference/javascript/

The diff includes the line to this channel.html in the FB.init({ ... });

-Dan

venusrising’s picture

@ifeelgood Did you ever try it with SDK 3?
@danvuquoc will this work with the stable version of 6 too?

danvuquoc’s picture

StatusFileSize
new53.59 KB

@venusrising The diff probably won't work on the dev version -- here's a packaged stable release version if you need it. It's what I'm using right now.

danvuquoc’s picture

@ifeelgood - I haven't actually USED Drupal 7 since we haven't migrated over to it here, but this weekend I could find some free-time to install it and patch the module over. I think most of the patch applies except for the code in fbconnect_footer() in fbconnect.module. I believe the array being constructed and html in that array are different in Drupal 7. Should be really easy to patch though.

ifeelgood’s picture

@danvuquoc i might just wait for you to patch it then ( i was thinking to modify it based on the trail you have done on 6) ^_^ as I was fairly new to drupal and to facebook api.

jacobpov’s picture

any updates for drupal 7 version?

danvuquoc’s picture

I tried getting the Drupal 7 version to work with some patches I made until I realized there's some other issues going on with it -- I can't even get it to work with SDK 2.x. Can anyone confirm that the Drupal 7 works for them with SDK 2.x before I continue with SDK 3.x?

jacobpov’s picture

nope doesn't even work with SDK 2.x. for me

nancydru’s picture

giorgio79’s picture

7.x Doesn't work for me either. I notice the invite submodule in both 6 and 7 uses FBML that is deprecated in favor of the JS SDK:
#1272874: Use the New Dialog Requests for invite instead of FBML that is being deprecated

ifeelgood’s picture

Hmmm... I have made it to work (d7). OK i'll just do it myself and post the patch over here ^_^. Might take some time as I was new to drupal to facebook and in creating a patch ^_^. Ill fix d7 version first then apply your changes ^_^

ciscoweb01’s picture

nice! can u post the patch? thanks :)

jacobpov’s picture

Sweet news gives us hope! , Would be really nice if you get it working.
Thanks!!!

ifeelgood’s picture

StatusFileSize
new228 bytes
new6.62 KB

Here is the patch for d7.

- fbml was added using hook_rdf_namespaces ( no need to add it to tpl).
- check comment 19 for the channel.html description and why it is needed.

all thanks to danvuquoc

steinmb’s picture

Subscribe, planning FB integration.

nancydru’s picture

Priority: Critical » Major

@steinmb: there's also http://drupal.org/project/fb

steinmb’s picture

@NancyDru: yeah, I know, but thanks :) I try to read up on the task and figure out with one of the modules to pick. Have played around with the fb module, but have not yet tested logging in by using the Facebook Connect API.

ciscoweb01’s picture

Priority: Major » Critical

@ifeelgood looks like i get no redirect to access login page when i use fbconnect module: facebook popup for login works properly but then i get no redirect on my drupal login page. Does it work for you?

acouch’s picture

StatusFileSize
new7.37 KB

This has worked for me so far. I rerolled to fix two small form issues and to include the channel.html in the patch.

barkingtiger’s picture

Title: Upgrade to PHP SDK ver 3.1.1 » Upgrade to PHP SDK v3.0.0

Can confirm similar experience to #37 after applying the patch in #32 . Get the connect button but after logging in I get no redirect. The following Javascript error is shown:

Uncaught Error: FB.getSession incompatible with OAuth2.

steinmb’s picture

Title: Upgrade to PHP SDK v3.0.0 » Upgrade to PHP SDK ver 3.1.1

Renaming title, we should up to 3.1.1 right? https://github.com/facebook/php-sdk

ciscoweb01’s picture

Title: Upgrade to PHP SDK v3.0.0 » Upgrade to PHP SDK ver 3.1.1

@barkingtiger looks like this module http://drupal.org/node/1166272 has a similar problems with "FB.getSession incompatible with OAuth2" and they solved it.

barkingtiger’s picture

I installed the patch from #37 and that seems to work fine for me at the moment. This module still needs quite a bit of work for D7, but basic functionality seems to be ok with that patch applied

tim.plunkett’s picture

Status: Needs review » Patch (to be ported)
nancydru’s picture

Issue tags: +Needs backport to D6

And is a backport to D6 in the works?

tim.plunkett’s picture

@NancyDru not from me, unfortunately. I'm barely able to get my head around the D7 branch.

nancydru’s picture

I understand that - look at my modules. Unfortunately, the site owner is not ready to pay me to upgrade to D7.

nancydru’s picture

venusrising’s picture

@danvuquoc do you know if this will work with 6.x-2.0-beta1 We are not using the dev. Thanks for your help.

esbite’s picture

StatusFileSize
new5.93 KB

I ported this to d6, seems to work. My first contrib ever so be kind :)

venusrising’s picture

@esbite Hello thanks for the share do you know if it plays nicely with the facebook connect mobile module?

HS’s picture

Status: Patch (to be ported) » Needs review
rares’s picture

D6 patch works for me. was able to login+register, and it also pulled the profile picture. thanks all!

mdesmet’s picture

I'm getting following error in Firebug console after clicking "Connect" on user login page:

getAuthResponse called when OAuth2 support is disabled. Please fix.

Are there any specific settings you need to set up on Facebook?

I've just gone with the default settings in Advanced.

I'm also getting an error occured in the authentication dialog from Facebook.

rares’s picture

can you double-check that facebook.js has patched correctly? also, can you please clear your caches? if says in the documentation that oauth is disabled by default, and oauth:true is specified in facebook.js. https://developers.facebook.com/docs/reference/javascript/FB.init/

venusrising’s picture

@danvuquoc Thanks for sharing this, just installed and it seems to work so far so good. However do you know how to get this working with facebook mobile module? it is throwing an oauth error invalid redirect URl error

http://drupal.org/project/fbmobile

johnTEN’s picture

Im lost at how to apply the patch to v6

rho_’s picture

Patch on #48 worked nicely for me. Thanks esbite!

dinchu’s picture

is there a software for windows to apply the diff patch automatically? it is a pain in the ass to manually apply it and many chances of inserting errors

pedrop’s picture

#48 worked for me too, thank you esbite! For those who need a quick solution under D6 I created a tar.gz with the patched module + the facebook php sdk 3.1.1 . Just download, extract and clear the cache.

Fb login and registration tested on 4 sites under Chrome 15, Firefox 8 .

yannickoo’s picture

Thanks pedrop, it works ♥

nancydru’s picture

Status: Needs review » Reviewed & tested by the community

Sounds like RTBC.

yannickoo’s picture

Status: Fixed » Reviewed & tested by the community

I would create a patch base on the uploaded module so that it's easier to merge the current version with the fixed version.

nancydru’s picture

Looks like tim.plunket is the current active maintainer. http://drupal.org/node/356460/committers

tim.plunkett’s picture

Status: Reviewed & tested by the community » Fixed
ajlozier’s picture

Status: Reviewed & tested by the community » Fixed

So, hindsight is 20/20 - but it took me awhile to realize that I had to upgrade the version of the PHP-SDK library I was using to the latest (https://github.com/facebook/php-sdk) IN ADDITION to applying these updates from the module. So just posting this in case anyone else missed this as well.

chroid’s picture

A heads up.

Have upgraded fbconnect to the dev version (6.x-2.x-dev) but still encountered errors with authentication.

This was fixed by upgrading the Facebook SDK from 3.0 to latest (at time of writing) Facebook SDK v.3.1.1.

Just in case other peeps are having similar issues!

Status: Fixed » Closed (fixed)

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

ken hawkins’s picture

Status: Closed (fixed) » Needs work

Sorry to reopen (maybe I should have opened a new thread, but too late now) but can we get a note on the homepage to not use the "stable" release as it does not work? Or even pushing the dev release into the current supported release?

Would have saved me 30 minutes and I'm sure many others the same amount of time to piece together that the current release is incompatible with the current required FB PHP library.

Also the readme linked to from the homepage is out of date.

miccelito’s picture

@ Ken Hawkins:

I agree with you. It was annoying to found that ONLY the dev version is working. Further more that the readme.txt is confusing regarding the information about adding libraries/facebook-php-sdk

acouch’s picture

As someone who has contributed to this module I would advise using the http://drupal.org/project/fboauth module.

ken hawkins’s picture

@acouch - thanks for the note, I hadn't noticed fboauth -- particularly like the line "Does not require any external libraries or downloads."

Seems like we're almost at the point to need a "comparison of Facebook authentication modules."

miccelito’s picture

I noticed now that Facebook PHP SDK 3.1.1 (latest update 2012-01-25/2012-02-02) is different compared with former Facebook PHP SDK 3.1.1. Might be confusing that facebook dev team using same version name 3.1.1 for two different Facebook PHP SDK...

  • tim.plunkett committed 9b4ddf1 on
    Issue #1169694 by danvuquoc, ifeelgood, acouch: Upgrade to PHP SDK ver 3...
id.tarzanych’s picture

Issue summary: View changes
Status: Needs work » Closed (works as designed)

Facebook SDK 3.x branch support has stopped

id.tarzanych’s picture

Status: Closed (works as designed) » Closed (won't fix)
AntiNSA’s picture

So does this mean that Drupal 6 is no longer working at all?